:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #cbd5e1;
  --dark: #111827;
  --dark-2: #334155;
  --accent: #1f2937;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #334155, #020617);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: #475569;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #020617;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: linear-gradient(135deg, #334155 0%, #475569 42%, #0f172a 100%);
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
    radial-gradient(circle at 84% 26%, rgba(148, 163, 184, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.68));
}

.hero-slider {
  position: relative;
  max-width: 1180px;
  min-height: 540px;
  margin: 0 auto;
  padding: 70px 22px 120px;
}

.hero-slide {
  position: absolute;
  inset: 70px 22px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 58px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 18px 0 22px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 19px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 850;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn.primary {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(12px);
}

.btn.full {
  width: 100%;
  color: #fff;
  background: #0f172a;
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 35px 80px rgba(2, 6, 23, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

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

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

.hero-poster span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.58);
  color: #fff;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

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

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

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

.hero-search {
  position: relative;
  z-index: 3;
  max-width: 740px;
  margin: -84px auto 0;
  padding: 10px;
  display: flex;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-large input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--text);
  outline: none;
  background: #fff;
}

.hero-search button,
.search-large button {
  min-width: 110px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #0f172a;
  font-weight: 850;
}

.hero-category-links {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 0 22px 62px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-category-links a {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-weight: 750;
}

.hero-card-section {
  max-width: 1180px;
  margin: -48px auto 30px;
  padding: 0 22px;
  position: relative;
  z-index: 4;
}

.content-section,
.page-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 22px;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.section-heading p,
.page-hero p,
.detail-content p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: #0f172a;
  font-weight: 850;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: #94a3b8;
  box-shadow: var(--shadow);
}

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

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-body {
  display: flex;
  min-height: 206px;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.card-body.compact {
  min-height: 172px;
}

.card-body strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.32;
}

.card-body em {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #475569;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-line {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

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

.category-tile {
  min-height: 170px;
  padding: 20px;
  border: 1px solid rgba(203, 213, 225, 0.74);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: #94a3b8;
}

.category-name {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.category-desc,
.category-preview {
  display: block;
  margin-top: 12px;
  color: #64748b;
  font-size: 14px;
}

.category-preview {
  color: #334155;
  font-weight: 750;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 72px 1fr 38px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.74);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.mini-card img {
  width: 72px;
  height: 96px;
  border-radius: 13px;
  object-fit: cover;
  background: #e2e8f0;
}

.mini-info b,
.mini-info em {
  display: block;
}

.mini-info b {
  color: #0f172a;
  line-height: 1.3;
}

.mini-info em {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.mini-card > span:last-child {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
}

.page-hero {
  margin-bottom: 28px;
  padding: 44px;
  border-radius: 28px;
  background: linear-gradient(135deg, #334155, #111827);
  color: #fff;
  box-shadow: var(--shadow);
}

.page-hero .eyebrow,
.page-hero h1,
.page-hero p {
  color: #fff;
}

.page-hero p {
  max-width: 820px;
  color: #e2e8f0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: #64748b;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #0f172a;
}

.filter-panel,
.search-page-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, 0.75);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-page-panel {
  display: block;
}

.search-large {
  display: flex;
  gap: 12px;
}

.search-status {
  margin-top: 16px;
  color: #64748b;
  font-weight: 750;
}

.detail-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px 54px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-content,
.side-card {
  border: 1px solid rgba(203, 213, 225, 0.75);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
  background: #000;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 2;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  font-size: 34px;
  backdrop-filter: blur(12px);
}

.detail-content {
  margin-top: 22px;
  padding: 30px;
}

.detail-content .eyebrow {
  color: #64748b;
}

.detail-content h1 {
  margin-top: 12px;
}

.lead-text {
  font-size: 19px;
  color: #334155 !important;
}

.detail-content h2,
.side-card h2 {
  margin: 28px 0 10px;
  color: #0f172a;
  font-size: 23px;
}

.detail-tags span {
  background: #f1f5f9;
  color: #334155;
}

.detail-side {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 20px;
}

.side-card {
  padding: 18px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  margin-bottom: 16px;
  border-radius: 18px;
  object-fit: cover;
  background: #e2e8f0;
}

.info-side dl {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px 14px;
  margin: 0;
}

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

.info-side dd {
  margin: 0;
  color: #0f172a;
  font-weight: 750;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  margin-top: 40px;
  padding: 42px 22px 30px;
  border-top: 1px solid rgba(203, 213, 225, 0.75);
  background: #fff;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}

.footer-inner strong {
  color: #0f172a;
  font-size: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 750;
}

.copyright {
  max-width: 1180px;
  margin: 28px auto 0;
  color: #94a3b8;
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero {
    min-height: 780px;
  }

  .hero-slider {
    min-height: 590px;
    padding-top: 42px;
  }

  .hero-slide {
    inset: 42px 22px 120px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    max-width: 260px;
  }

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

  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .ranking-list,
  .filter-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .site-logo {
    max-width: 74vw;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
  }

  .hero h1,
  .hero h2 {
    font-size: 36px;
  }

  .hero-summary {
    font-size: 16px;
  }

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

  .hero-search button,
  .search-large button {
    min-height: 48px;
  }

  .content-section,
  .page-main,
  .detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .compact-grid,
  .hero-card-grid,
  .category-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero,
  .detail-content {
    padding: 24px;
  }

  .mini-card {
    grid-template-columns: 64px 1fr 34px;
  }

  .mini-card img {
    width: 64px;
    height: 86px;
  }
}
