:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --text: #111827;
  --text-muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --dark: #111827;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 24rem);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.nav-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #475569);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.2);
}

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

.brand-title {
  font-size: 1.1rem;
  color: #1f2937;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-search {
  flex: 1;
  display: flex;
  max-width: 430px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}

.nav-search input,
.mobile-search input,
.filter-row input,
.filter-row select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.nav-search input {
  padding: 9px 14px;
}

.nav-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  color: #ffffff;
  background: #111827;
  cursor: pointer;
}

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

.nav-link,
.mobile-nav-link {
  color: #4b5563;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.mobile-search input {
  padding: 9px 12px;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.home-hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img,
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1f2937, #64748b);
}

.hero-overlay,
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.64) 48%, rgba(15, 23, 42, 0.2)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.55), transparent 48%);
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-content h1 {
  width: min(760px, 100%);
  margin: 20px 0 16px;
  color: #ffffff;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  width: min(720px, 100%);
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags a,
.movie-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-light {
  color: #111827;
  background: #ffffff;
}

.button-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.button-text {
  color: #ffffff;
}

.button-dark {
  color: #ffffff;
  background: #111827;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

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

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.category-strip {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
}

.strip-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 14px 0;
}

.strip-shell span {
  flex: 0 0 auto;
  color: #111827;
  font-weight: 700;
}

.strip-shell a,
.hero-mini-link {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 14px;
  color: #475569;
  background: #f1f5f9;
  transition: background 0.2s ease, color 0.2s ease;
}

.strip-shell a:hover,
.hero-mini-link:hover {
  color: #111827;
  background: #e2e8f0;
}

main {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.section-block {
  padding: 58px 0 0;
}

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

.section-head h2 {
  margin: 10px 0 0;
  color: #111827;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.section-head a {
  color: #475569;
  font-weight: 700;
}

.section-kicker {
  color: #475569;
  background: #f1f5f9;
  border-color: var(--line);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 12px 30px 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: rgba(148, 163, 184, 0.55);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.25;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.movie-card-small .poster-wrap {
  aspect-ratio: 16 / 10;
}

.poster-wrap img,
.category-covers img,
.rank-item img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.52), transparent 50%);
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

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

.movie-card-body strong {
  overflow: hidden;
  color: #111827;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-line {
  min-height: 2.8em;
  overflow: hidden;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.movie-meta em {
  font-style: normal;
}

.movie-tags span {
  color: #475569;
  background: #f1f5f9;
}

.rank-home {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  margin-top: 68px;
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 1px solid var(--line);
}

.rank-home-left h2 {
  margin: 12px 0 12px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.rank-home-left p {
  color: #64748b;
  margin-bottom: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.09);
}

.rank-number {
  color: #111827;
  font-weight: 800;
  font-size: 1.1rem;
}

.rank-item img {
  height: 58px;
  border-radius: 12px;
}

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

.rank-info strong,
.rank-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info span,
.rank-views {
  color: #64748b;
  font-size: 0.85rem;
}

.page-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #111827;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 74px;
  color: #ffffff;
}

.page-hero-content h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero-content p {
  width: min(760px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
}

.hero-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  min-height: 170px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  background: #e2e8f0;
}

.category-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 24px;
}

.category-content strong {
  color: #111827;
  font-size: 1.35rem;
}

.category-content span {
  color: #64748b;
}

.filter-panel {
  margin: 32px 0 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
}

.filter-row input,
.filter-row select {
  min-height: 46px;
  border-radius: 16px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-tags button {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  color: #475569;
  background: #f1f5f9;
  cursor: pointer;
}

.filter-tags button.is-active {
  color: #ffffff;
  background: #111827;
}

.rank-page {
  padding-top: 38px;
}

.large-rank-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.detail-main {
  padding-top: 30px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4.2;
  border-radius: 26px;
  background: #e2e8f0;
}

.detail-info h1 {
  margin: 18px 0 14px;
  color: #111827;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-info .eyebrow {
  color: #475569;
  background: #f1f5f9;
  border-color: var(--line);
}

.detail-one-line {
  color: #475569;
  font-size: 1.12rem;
  margin: 0 0 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-tags a {
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.player-section {
  padding-top: 42px;
}

.player-box {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(255, 255, 255, 0.18);
  font-size: 1.8rem;
  padding-left: 4px;
}

.player-overlay strong {
  max-width: min(560px, 80%);
  text-align: center;
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.detail-content {
  padding: 46px 0 0;
}

.detail-content h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 1.65rem;
}

.detail-content p {
  margin: 0 0 28px;
  color: #475569;
  font-size: 1.04rem;
  line-height: 1.9;
}

.related-section {
  padding-bottom: 28px;
}

.site-footer {
  margin-top: 72px;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border-top: 1px solid var(--line);
}

.footer-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 34px;
  padding: 46px 0 30px;
}

.footer-main p {
  width: min(480px, 100%);
  color: #64748b;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 1rem;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-column a {
  color: #64748b;
}

.footer-column a:hover {
  color: #111827;
}

.footer-bottom {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #94a3b8;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

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

  .rank-home,
  .large-rank-list,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .nav-shell {
    min-height: 64px;
  }

  .nav-search,
  .desktop-nav {
    display: none;
  }

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

  .home-hero {
    height: 560px;
  }

  .hero-content h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

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

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

  .rank-home {
    padding: 24px;
  }

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

  .rank-views {
    display: none;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

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

  .category-covers {
    min-height: 160px;
  }

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

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

@media (max-width: 560px) {
  .brand-subtitle {
    display: none;
  }

  .home-hero {
    height: 610px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .section-block {
    padding-top: 42px;
  }

  .page-hero-content {
    padding: 72px 0 56px;
  }

  .rank-item {
    grid-template-columns: 34px 58px minmax(0, 1fr);
    gap: 10px;
  }

  .detail-info h1 {
    font-size: 2.3rem;
  }
}
