:root {
  --site-primary: #2563eb;
  --site-primary-dark: #1d4ed8;
  --site-accent: #f97316;
  --site-bg: #f8fafc;
  --site-ink: #111827;
  --site-muted: #64748b;
  --site-card: #ffffff;
  --site-border: #e2e8f0;
  --site-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--site-bg);
  color: var(--site-ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body.nav-open {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.site-header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.site-logo {
  font-size: 22px;
}

.site-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.site-nav a,
.mobile-menu a,
.category-strip a {
  transition: 0.2s ease;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.category-strip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-strip a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.category-strip a:hover {
  color: #ffffff;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  padding: 0 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-menu a {
  display: block;
  padding: 14px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.hero-slider {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  height: 560px;
  margin: 32px auto 0;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--site-shadow);
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.55s ease;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-slide img,
.category-card-covers img,
.category-thumb-stack img,
.poster-frame img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.hero-slide img {
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.56) 46%, rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 58%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  right: clamp(20px, 32vw, 420px);
  bottom: clamp(84px, 12vw, 128px);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.32);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-content h1 {
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

.hero-content p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  margin-bottom: 24px;
}

.hero-actions,
.detail-tags,
.search-toolbar,
.inline-filter,
.mini-links,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button,
.text-button,
.hero-search button,
.search-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  background: var(--site-primary);
  color: #ffffff;
  padding: 13px 22px;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.32);
}

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

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: 0.2s ease;
}

.hero-slider:hover .hero-arrow {
  opacity: 1;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.hero-search {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  right: clamp(24px, 6vw, 72px);
  bottom: 24px;
  max-width: 640px;
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-toolbar input,
.search-toolbar select,
.inline-filter input {
  height: 48px;
  border: 1px solid var(--site-border);
  border-radius: 14px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--site-ink);
  outline: none;
}

.hero-search input {
  flex: 1;
  background: rgba(255, 255, 255, 0.92);
}

.hero-search button {
  background: var(--site-accent);
  color: #ffffff;
  padding: 0 20px;
}

.home-page,
.page-shell,
.detail-shell {
  padding-bottom: 56px;
}

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 56px auto 0;
}

.soft-panel,
.rank-panel,
.editor-section,
.page-hero,
.detail-header,
.detail-main,
.detail-side,
.category-overview-card {
  background: var(--site-card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.soft-panel,
.rank-panel,
.editor-section {
  padding: clamp(20px, 4vw, 36px);
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.045em;
  color: var(--site-ink);
}

.section-heading p {
  color: var(--site-muted);
  margin-top: 6px;
}

.section-link,
.text-button {
  color: var(--site-primary);
  font-weight: 800;
}

.section-link:hover,
.text-button:hover {
  color: var(--site-primary-dark);
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.86);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  min-width: 0;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.poster-frame img {
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 58%);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.movie-duration,
.movie-category {
  position: absolute;
  z-index: 2;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  padding: 5px 8px;
  border-radius: 8px;
}

.movie-duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.movie-category {
  left: 10px;
  top: 10px;
  background: var(--site-accent);
}

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: auto;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: scale(0.86);
  transition: 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: scale(1);
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.movie-card-body strong {
  font-size: 17px;
  line-height: 1.35;
  color: var(--site-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-line {
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  color: #64748b;
  font-size: 13px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.horizontal-list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.compact-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

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

.category-card,
.category-overview-card {
  display: block;
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--site-border);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

.category-card-covers,
.category-thumb-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  height: 110px;
  overflow: hidden;
  border-radius: 16px;
  background: #1e293b;
  margin-bottom: 16px;
}

.category-card-covers img,
.category-thumb-stack img {
  min-width: 0;
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  font-size: 21px;
  font-weight: 900;
  color: var(--site-ink);
  margin-bottom: 8px;
}

.category-card span:last-child,
.category-overview-card p {
  color: var(--site-muted);
  line-height: 1.7;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
}

.category-thumb-stack {
  height: 100%;
  min-height: 160px;
  margin-bottom: 0;
}

.mini-links {
  margin: 16px 0;
}

.mini-links a {
  color: var(--site-primary);
  font-size: 14px;
  background: #eff6ff;
  padding: 6px 10px;
  border-radius: 999px;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--site-border);
  transition: 0.2s ease;
}

.ranking-row:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
  color: #ffffff;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
  color: var(--site-ink);
}

.rank-meta {
  color: var(--site-muted);
  font-size: 14px;
}

.ranking-card {
  position: relative;
}

.ranking-card > .rank-num {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 5;
}

.page-shell {
  padding-top: 32px;
}

.page-hero {
  padding: clamp(26px, 5vw, 48px);
  margin-bottom: 30px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 42%), #ffffff;
}

.small-hero h1,
.detail-header h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.055em;
  margin-bottom: 14px;
}

.small-hero p,
.detail-header p {
  color: var(--site-muted);
  font-size: 18px;
  line-height: 1.85;
  max-width: 900px;
}

.search-toolbar {
  margin-top: 24px;
}

.search-toolbar input {
  min-width: min(100%, 320px);
  flex: 1;
}

.search-toolbar select {
  min-width: 150px;
}

.inline-filter {
  margin-top: 22px;
}

.inline-filter input {
  width: min(100%, 420px);
}

.empty-state {
  text-align: center;
  padding: 48px 0;
  color: var(--site-muted);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--site-muted);
  font-size: 14px;
  margin: 24px 0;
}

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

.player-section {
  margin-bottom: 30px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--site-shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #020617;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
}

.player-cover-shade {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
}

.player-play-button {
  position: relative;
  z-index: 3;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.38);
  font-size: 34px;
  padding-left: 5px;
}

.detail-header {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 280px);
  gap: 24px;
  padding: clamp(24px, 4vw, 36px);
  margin-bottom: 28px;
}

.detail-tags {
  margin-top: 20px;
}

.detail-tags span {
  color: #1d4ed8;
  background: #dbeafe;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.detail-score {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eff6ff, #fff7ed);
  padding: 22px;
}

.detail-score strong {
  font-size: 36px;
  color: var(--site-accent);
}

.detail-score span {
  color: var(--site-muted);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.detail-main,
.detail-side {
  padding: clamp(22px, 4vw, 34px);
}

.detail-section + .detail-section {
  margin-top: 28px;
}

.detail-section h2,
.detail-side h2,
.site-footer h2 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 14px;
}

.detail-section p {
  color: #334155;
  line-height: 2;
  margin-top: 12px;
}

.detail-side dl {
  display: grid;
  gap: 14px;
}

.detail-side dt {
  color: var(--site-muted);
  font-size: 13px;
}

.detail-side dd {
  color: var(--site-ink);
  font-weight: 800;
  line-height: 1.6;
}

.detail-side a {
  color: var(--site-primary);
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 56px;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.72);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
  margin-bottom: 14px;
}

.site-footer p {
  line-height: 1.8;
  max-width: 520px;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 17px;
}

.site-footer a {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.56);
}

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

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

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

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

  .mobile-menu-button {
    display: flex;
    margin-left: auto;
  }

  body.nav-open .mobile-menu {
    display: block;
  }

  .hero-slider {
    height: 640px;
    border-radius: 22px;
  }

  .hero-content {
    right: 24px;
    bottom: 132px;
  }

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

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .six-grid,
  .two-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-grid,
  .detail-layout,
  .detail-header,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 46px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }
}

@media (max-width: 540px) {
  .site-logo {
    font-size: 18px;
  }

  .hero-slider,
  .content-section {
    width: calc(100% - 20px);
  }

  .hero-slider {
    height: 590px;
    margin-top: 16px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

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

  .search-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-toolbar select,
  .search-toolbar input,
  .inline-filter input {
    width: 100%;
  }

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

  .player-play-button {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
