:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --muted: #64748b;
  --text: #0f172a;
  --soft: #e2e8f0;
  --line: #dbe3ef;
  --blue: #2563eb;
  --blue-2: #38bdf8;
  --dark: #020617;
  --dark-2: #0f172a;
  --radius: 22px;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.94);
  color: #fff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(18px);
}

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

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

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

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.38);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.32);
}

.top-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.large-search input,
.page-filter {
  border: 1px solid rgba(148, 163, 184, 0.28);
  outline: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  padding: 11px 16px;
  min-width: 230px;
}

.top-search input::placeholder,
.mobile-search input::placeholder,
.large-search input::placeholder {
  color: #94a3b8;
}

.top-search button,
.mobile-search button,
.large-search button,
.primary-btn,
.rank-action {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  font-weight: 700;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mobile-link {
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
}

.mobile-link.is-active {
  background: rgba(37, 99, 235, 0.46);
  color: #fff;
}

.hero-slider {
  position: relative;
  background: var(--dark);
  color: #fff;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.56fr);
  align-items: center;
  gap: 54px;
  padding: 76px max(32px, calc((100vw - 1320px) / 2 + 24px));
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, var(--bg), transparent);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(147, 197, 253, 0.38);
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 22px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

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

.ghost-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff;
  font-weight: 700;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-poster span,
.poster-play {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.88);
  color: #fff;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.42);
}

.hero-poster span {
  left: 22px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  font-size: 24px;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #fff;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  font-size: 30px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search-panel,
.filter-bar {
  width: min(1320px, calc(100% - 32px));
  margin: 28px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.quick-search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.large-search {
  flex: 1;
}

.large-search input {
  width: 100%;
  background: #fff;
  color: var(--text);
}

.quick-links,
.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a,
.filter-links a,
.text-link {
  color: var(--blue);
  background: #eff6ff;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 700;
}

.page-section {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0;
}

.soft-section {
  padding-top: 24px;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-more {
  color: var(--blue);
  font-weight: 800;
}

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

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

.movie-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.movie-poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.movie-card h2,
.rank-content h2,
.category-overview-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p,
.rank-content p,
.category-overview-card p {
  color: var(--muted);
  margin: 9px 0 0;
}

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

.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.movie-card .tag-row {
  margin-top: 12px;
}

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

.category-tile {
  min-height: 168px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  color: #fff;
  padding: 20px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  font-size: 14px;
  color: #dbeafe;
}

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

.ranking-panel,
.side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel-title,
.side-card h2 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 82px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}

.ranking-panel .rank-item {
  grid-template-columns: 62px 34px minmax(0, 1fr);
}

.ranking-panel .rank-action {
  display: none;
}

.rank-cover img {
  width: 82px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-panel .rank-cover img {
  width: 62px;
}

.rank-index {
  color: var(--blue);
  font-size: 22px;
  font-weight: 950;
  text-align: center;
}

.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 16px;
}

.inner-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--dark), #1e293b);
  padding: 72px max(24px, calc((100vw - 1320px) / 2 + 24px));
}

.inner-hero.with-bg {
  background-size: cover;
  background-position: center;
}

.inner-hero p {
  margin: 0 0 10px;
  color: #93c5fd;
  font-weight: 900;
}

.inner-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.inner-hero span {
  display: block;
  max-width: 760px;
  margin-top: 14px;
  color: #dbeafe;
  font-size: 17px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-filter {
  flex: 1;
  min-width: 260px;
  background: #fff;
  color: var(--text);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.category-cover-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--dark-2);
}

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

.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.category-preview-links a {
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
}

.breadcrumb-bar {
  width: min(1320px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb-bar a {
  color: var(--blue);
  font-weight: 700;
}

.watch-layout {
  width: min(1320px, calc(100% - 32px));
  margin: 24px auto 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.player-shell {
  position: relative;
  background: #000;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.34);
}

.hls-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
  font-weight: 900;
  font-size: 18px;
}

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.94);
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.48);
  font-size: 30px;
}

.detail-article,
.detail-side .side-card {
  margin-top: 22px;
}

.detail-article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.detail-title-block h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.15;
}

.detail-title-block p {
  color: var(--muted);
  margin: 0;
  font-size: 17px;
}

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

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

.detail-info-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 20px;
  background: #f8fafc;
}

.detail-info-card h2,
.text-block h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 800;
}

.text-block {
  margin-top: 26px;
}

.text-block p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.prev-next a {
  display: block;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--blue);
  font-weight: 800;
  padding: 14px 16px;
}

.side-list {
  display: grid;
  gap: 16px;
}

.movie-card.is-compact {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
}

.movie-card.is-compact .movie-poster-link img {
  height: 100%;
  min-height: 138px;
}

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

.movie-card.is-compact h2 {
  font-size: 16px;
}

.movie-card.is-compact p {
  font-size: 13px;
}

.site-footer {
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #cbd5e1;
  padding: 50px 0 22px;
}

.footer-grid {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  max-width: 540px;
  margin: 16px 0 0;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  width: min(1320px, calc(100% - 32px));
  margin: 32px auto 0;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 18px;
}

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .hero-slide,
  .watch-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

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

  .detail-side .side-card {
    margin-top: 0;
  }
}

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

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

  .quick-search-panel,
  .filter-bar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .hero-stage {
    min-height: 760px;
  }

  .hero-slide {
    padding-top: 58px;
    gap: 28px;
  }
}

@media (max-width: 620px) {
  .site-header-inner {
    min-height: 64px;
  }

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

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

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

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

  .hero-copy p {
    font-size: 16px;
  }

  .rank-item,
  .ranking-panel .rank-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .rank-index,
  .rank-action {
    display: none;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

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

  .movie-card.is-compact {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}
