:root {
  color-scheme: light;
  --site-bg: #f8fafc;
  --site-surface: #ffffff;
  --site-text: #111827;
  --site-muted: #64748b;
  --site-border: #e5e7eb;
  --site-primary: #2563eb;
  --site-primary-dark: #1d4ed8;
  --site-danger: #dc2626;
  --site-shadow: 0 14px 40px rgba(15, 23, 42, 0.10);
  --site-radius: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.header-inner,
.category-strip-inner,
.main-container,
.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.site-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-brand {
  font-size: 1.28rem;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--site-primary), #60a5fa);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.26);
  font-size: 0.82rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-link,
.mobile-nav-link {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.active,
.mobile-nav-link.active {
  color: var(--site-primary);
}

.mobile-menu-button {
  display: none;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 0.7rem;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1.25rem;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 0.85rem;
}

.mobile-nav.open {
  display: grid;
  gap: 0.55rem;
}

.mobile-nav-link {
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.category-strip {
  border-top: 1px solid rgba(226, 232, 240, 0.72);
}

.category-strip-inner {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 0.72rem 0;
}

.category-strip-inner a {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 650;
}

.category-strip-inner a:hover {
  color: var(--site-primary);
}

.main-container {
  padding: 2rem 0 4rem;
}

.hero {
  position: relative;
  min-height: 570px;
  margin: 1.5rem auto 2.7rem;
  overflow: hidden;
  border-radius: 1.6rem;
  background: #020617;
  box-shadow: var(--site-shadow);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52) 46%, rgba(0, 0, 0, 0.12)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 50%);
}

.hero-content {
  position: absolute;
  left: clamp(1.2rem, 6vw, 5rem);
  bottom: clamp(2rem, 7vw, 5rem);
  width: min(700px, calc(100% - 2.4rem));
  color: #fff;
}

.hero-pills,
.detail-pills,
.card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.hero-pills span,
.detail-pills span,
.card-pills span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.38rem 0.78rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-pills span:first-child {
  background: var(--site-danger);
  color: #fff;
}

.hero-pills span:not(:first-child),
.detail-pills span,
.card-pills span {
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
  border: 1px solid rgba(147, 197, 253, 0.24);
}

.hero-content h1,
.hero-content h2 {
  margin: 1rem 0 0.85rem;
  font-size: clamp(2.35rem, 6vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 1.5rem;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button-primary,
.button-secondary,
.button-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.78rem 1.45rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-primary {
  background: var(--site-primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.button-primary:hover {
  background: var(--site-primary-dark);
  transform: translateY(-2px);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

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

.button-light {
  background: #eff6ff;
  color: var(--site-primary);
}

.button-light:hover {
  background: #dbeafe;
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

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

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

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

.search-panel,
.content-panel,
.detail-panel,
.player-panel {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.search-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(120px, 0.5fr));
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 2.4rem;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 2.85rem;
  padding: 0 0.9rem;
  border: 1px solid var(--site-border);
  border-radius: 0.9rem;
  background: #fff;
  color: #0f172a;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}

.section-heading h2,
.page-title,
.detail-title {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.section-heading p,
.page-intro {
  margin: 0.45rem 0 0;
  color: var(--site-muted);
  line-height: 1.75;
}

.section-heading a {
  flex: 0 0 auto;
  color: var(--site-primary);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--site-border);
  border-radius: 1.15rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

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

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.play-chip {
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.32rem 0.66rem;
  background: rgba(37, 99, 235, 0.92);
}

.rank-badge {
  left: 0.65rem;
  top: 0.65rem;
  padding: 0.32rem 0.58rem;
  background: rgba(220, 38, 38, 0.92);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-meta {
  margin-top: 0.45rem;
  color: #64748b;
  font-size: 0.84rem;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.9em;
  margin: 0.65rem 0 0;
  overflow: hidden;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.72rem;
}

.tag-row span {
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.74rem;
  font-weight: 700;
}

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

.category-card {
  min-height: 170px;
  padding: 1.2rem;
  border-radius: var(--site-radius);
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid #dbeafe;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.15);
}

.category-card strong {
  display: block;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 850;
}

.category-card p {
  margin: 0.65rem 0 1rem;
  color: #475569;
  line-height: 1.65;
}

.category-card span {
  color: var(--site-primary);
  font-weight: 800;
}

.layout-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.4rem;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 2.4rem 4.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--site-border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(3px);
  border-color: #bfdbfe;
}

.ranking-number {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--site-primary);
  font-weight: 900;
}

.ranking-item img {
  width: 4.2rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.7rem;
  background: #0f172a;
}

.ranking-text {
  min-width: 0;
}

.ranking-text strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-text em {
  display: block;
  margin-top: 0.2rem;
  overflow: hidden;
  color: #64748b;
  font-size: 0.83rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-panel {
  padding: 1.2rem;
}

.page-head {
  margin: 1.2rem 0 1.8rem;
}

.page-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

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

.breadcrumb a {
  color: var(--site-primary);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 1.6rem;
  align-items: stretch;
  margin-bottom: 1.4rem;
}

.detail-cover {
  overflow: hidden;
  border-radius: 1.2rem;
  background: #0f172a;
  box-shadow: var(--site-shadow);
}

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

.detail-panel {
  padding: 1.5rem;
}

.detail-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 1rem 0;
  color: #475569;
  font-weight: 700;
}

.detail-summary {
  color: #334155;
  font-size: 1rem;
  line-height: 1.9;
}

.detail-pills span,
.card-pills span {
  color: var(--site-primary);
  background: #eff6ff;
  border-color: #dbeafe;
}

.player-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.4rem;
  background: #020617;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-cover-button {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.55));
  color: #fff;
  cursor: pointer;
}

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

.player-button-core {
  width: clamp(4.5rem, 10vw, 6rem);
  height: clamp(4.5rem, 10vw, 6rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.96);
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.38);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.detail-copy {
  display: grid;
  gap: 1rem;
  margin: 1.4rem 0;
}

.detail-copy h2 {
  margin: 0;
  font-size: 1.45rem;
  color: #0f172a;
}

.detail-copy p {
  margin: 0;
  color: #334155;
  line-height: 1.95;
}

.no-results {
  display: none;
  padding: 2rem;
  border-radius: var(--site-radius);
  background: #fff;
  color: #64748b;
  text-align: center;
  border: 1px solid var(--site-border);
}

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

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 0;
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

.footer-brand {
  color: #fff;
  font-size: 1.2rem;
}

.site-footer p {
  max-width: 760px;
  margin: 0.65rem 0 0;
  line-height: 1.75;
}

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

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

.footer-copy {
  color: #94a3b8;
  font-size: 0.9rem;
}

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

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

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

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

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

  .hero {
    min-height: 520px;
    border-radius: 1.1rem;
  }

  .search-panel {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .detail-cover {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .category-strip-inner,
  .main-container,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1280px);
  }

  .site-brand {
    font-size: 1.08rem;
  }

  .category-strip-inner {
    gap: 0.9rem;
  }

  .hero {
    min-height: 520px;
    margin-top: 0.9rem;
  }

  .hero-content {
    left: 1rem;
    bottom: 3.4rem;
    width: calc(100% - 2rem);
  }

  .hero-control {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .ranking-item {
    grid-template-columns: 2rem 3.6rem minmax(0, 1fr);
  }

  .ranking-item img {
    width: 3.6rem;
  }
}
