:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --line: rgba(15, 23, 42, 0.08);
  --dark: #0f172a;
  --dark-2: #1f2937;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 52%, #fafaf9 100%);
  min-height: 100vh;
}

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: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #4b5563);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.22);
  transition: transform 0.24s ease;
}

.brand:hover .brand-mark,
.footer-logo:hover .brand-mark {
  transform: scale(1.08);
}

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

.brand-text strong {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-text em {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

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

.nav-link {
  position: relative;
  padding: 10px 13px;
  color: #374151;
  font-weight: 650;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
  background: rgba(17, 24, 39, 0.05);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  width: 252px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(249, 250, 251, 0.9);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 8px 12px;
  background: transparent;
  color: #111827;
}

.header-search button,
.filter-panel button,
.btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
  color: #fff;
  background: #111827;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 4px;
}

main {
  width: 100%;
}

.hero-slider {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
}

.hero-frame {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  border-radius: 32px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: center;
  gap: 56px;
  padding: 70px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.08);
  transform: scale(1.12);
  opacity: 0.34;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 34%), linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(31, 41, 55, 0.78));
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy .eyebrow,
.page-hero .eyebrow {
  color: #d1d5db;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-desc {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.18rem;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #374151;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
}

.btn.primary {
  color: #111827;
  background: #fff;
  box-shadow: 0 16px 40px rgba(255, 255, 255, 0.16);
}

.btn.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn:hover,
.header-search button:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.hero-dots {
  position: absolute;
  left: 70px;
  bottom: 36px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

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

.hero-quick-links {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 4px 4px;
}

.hero-quick-links a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: #374151;
  font-weight: 750;
}

.content-section,
.detail-layout,
.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
}

.intro-panel {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.045em;
}

.intro-panel h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
}

.intro-panel p:last-child {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.section-heading p {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 800;
}

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

.section-more {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: #374151;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-weight: 750;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.movie-rail .movie-card {
  width: 190px;
  flex: 0 0 190px;
  scroll-snap-align: start;
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #e5e7eb;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #fff;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.movie-card:hover .poster-link {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

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

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

.movie-card:hover .poster-play {
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  padding-top: 12px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 750;
}

.movie-card h3,
.movie-card h2 {
  margin: 6px 0 6px;
  color: #111827;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  color: #475569;
  background: #eef2f7;
}

.tag-row.large span {
  padding: 7px 12px;
  font-size: 0.85rem;
}

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

.category-tile,
.category-card {
  display: block;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile span,
.category-card span {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 1.2rem;
  font-weight: 850;
}

.category-tile strong,
.category-card strong {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 700;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.rank-item p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  min-height: 350px;
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  padding: 54px;
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(31, 41, 55, 0.82)), var(--hero-image, none) center / cover;
  box-shadow: var(--shadow);
}

.page-hero.compact {
  min-height: 250px;
  background: linear-gradient(135deg, #111827, #374151);
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.page-hero p:last-child {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.8;
}

.filter-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.filter-panel form {
  display: grid;
  grid-template-columns: 1.3fr 0.75fr 0.75fr 0.5fr auto;
  gap: 12px;
  align-items: end;
}

.filter-title {
  display: none;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 10px 12px;
  background: #fff;
  color: #111827;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.filter-panel button {
  min-height: 42px;
  padding: 10px 16px;
  color: #fff;
  background: #111827;
}

.detail-layout {
  margin-top: 30px;
}

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

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

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

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.64));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #fff;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
}

.player-overlay strong {
  font-size: 1.05rem;
}

.player-overlay.is-hidden {
  display: none;
}

.detail-copy,
.side-panel {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

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

.detail-copy .lead {
  color: #374151;
  font-size: 1.1rem;
  line-height: 1.8;
}

.detail-copy h2,
.side-panel h2 {
  margin: 28px 0 12px;
  font-size: 1.35rem;
}

.detail-copy p {
  color: #4b5563;
  line-height: 1.95;
}

.detail-poster {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.side-panel {
  position: sticky;
  top: 96px;
}

.side-panel h2 {
  margin-top: 0;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.side-panel dt {
  color: #64748b;
  font-weight: 800;
}

.side-panel dd {
  margin: 0;
  color: #111827;
  line-height: 1.6;
}

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

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #0f172a);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 52px 0;
}

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

.footer-brand p {
  max-width: 560px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-col h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
}

.footer-col a {
  color: #9ca3af;
  transition: color 0.2s ease;
}

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

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

.is-hidden {
  display: none !important;
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 270px;
    padding: 52px;
  }

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

  .detail-side {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
  }

  .side-panel {
    position: static;
    margin-top: 0;
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    order: 3;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    border-radius: 14px;
  }

  .header-search {
    order: 4;
    display: none;
    width: 100%;
  }

  .site-nav.is-open + .header-search,
  .header-search.is-open {
    display: flex;
  }

  .hero-frame {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px;
  }

  .hero-poster {
    width: 220px;
  }

  .hero-dots {
    left: 32px;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .hero-slider,
  .content-section,
  .detail-layout,
  .filter-panel,
  .page-hero {
    width: min(100% - 22px, 1180px);
  }

  .hero-frame {
    min-height: 680px;
    border-radius: 24px;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .page-hero {
    min-height: 240px;
    padding: 30px;
    border-radius: 24px;
  }

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

  .rank-list,
  .rank-list.wide {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-poster {
    max-width: 280px;
  }

  .detail-copy,
  .side-panel,
  .intro-panel {
    padding: 22px;
  }

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