:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --sky: #0284c7;
  --sky-deep: #0369a1;
  --purple: #7c3aed;
  --emerald: #059669;
  --orange: #ea580c;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 48%, #f8fafc 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: 50;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--purple));
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.28);
  font-size: 13px;
}

.brand-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-nav-link {
  color: #475569;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--sky-deep);
  background: #e0f2fe;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #e0f2fe;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--sky-deep);
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 12px 14px;
  background: #f8fafc;
}

main {
  overflow: hidden;
}

.hero-section {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 20px 34px;
  min-height: 560px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 34px;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sky-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
  margin: 16px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
  max-width: 620px;
}

.hero-search {
  margin-top: 28px;
  display: flex;
  max-width: 540px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: var(--text);
}

.hero-search button,
.primary-button,
.card-action,
.rank-play,
.filter-selects button {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--purple));
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-search button {
  padding: 12px 20px;
  font-weight: 800;
}

.primary-button,
.ghost-button {
  padding: 12px 18px;
  font-weight: 800;
}

.primary-button:hover,
.card-action:hover,
.rank-play:hover,
.filter-selects button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(2, 132, 199, 0.28);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--sky-deep);
  background: #e0f2fe;
  font-weight: 700;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition: opacity 0.55s ease, transform 0.8s ease, visibility 0.55s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.62) 43%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-slide-content {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  color: #ffffff;
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.24);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-slide-content h2 {
  margin: 18px 0 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-slide-content p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.85;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 16px;
}

.hero-next {
  right: 16px;
}

.hero-dots {
  position: absolute;
  left: 34px;
  top: 28px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section,
.page-main .breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px;
}

.soft-section {
  max-width: none;
  background: rgba(255, 255, 255, 0.64);
}

.soft-section > .section-heading,
.soft-section > .category-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading h2,
.rank-head h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more,
.rank-head a {
  color: var(--sky-deep);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #bae6fd;
  box-shadow: 0 22px 38px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
}

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

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.88);
  box-shadow: 0 10px 18px rgba(2, 132, 199, 0.28);
}

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

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

.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card h3,
.horizontal-card h3,
.rank-info h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover,
.rank-info h2 a:hover {
  color: var(--sky-deep);
}

.movie-card p,
.horizontal-card p,
.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  color: #075985;
  background: #e0f2fe;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.card-action {
  margin-top: auto;
  display: inline-flex;
  justify-content: center;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 14px;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  min-height: 160px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid #dbeafe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.12);
}

.category-tile span,
.category-overview-card h2 {
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--purple));
}

.category-samples {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.category-samples img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
}

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

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

.horizontal-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: #ffffff;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.horizontal-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #e2e8f0;
}

.horizontal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.rank-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.compact-rank li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.compact-rank span,
.rank-number {
  color: var(--orange);
  font-weight: 900;
}

.compact-rank a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.compact-rank em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-main {
  padding-top: 24px;
}

.page-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 20px 42px;
}

.small-hero,
.category-hero,
.search-hero,
.rank-hero {
  min-height: 260px;
  border-radius: 0 0 34px 34px;
}

.filter-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  padding: 18px;
  margin-bottom: 28px;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fafc;
  padding: 0 14px;
}

.filter-search span {
  color: var(--sky-deep);
  font-size: 20px;
}

.filter-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 14px 0;
  background: transparent;
}

.filter-selects {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  align-items: end;
}

.filter-selects label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.filter-selects select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
  outline: 0;
}

.filter-selects select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.filter-selects button {
  min-height: 44px;
  padding: 0 14px;
  font-weight: 900;
}

.empty-state {
  margin-top: 24px;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border-radius: 18px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.rank-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #e2e8f0;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-play {
  padding: 10px 18px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding-bottom: 20px;
}

.breadcrumb a:hover {
  color: var(--sky-deep);
}

.detail-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.player-section,
.detail-article,
.cover-card,
.info-card,
.text-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.player-section {
  padding: 14px;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.58));
}

.play-layer.is-hidden {
  display: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--purple));
  font-size: 28px;
  box-shadow: 0 18px 34px rgba(2, 132, 199, 0.38);
}

.detail-article {
  margin-top: 22px;
  padding: 28px;
}

.detail-article h1 {
  margin: 12px 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.detail-one-line {
  color: #475569;
  font-size: 18px;
  line-height: 1.85;
}

.detail-article h2,
.info-card h2,
.cover-card h2 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.detail-article p {
  line-height: 2;
  color: #334155;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.cover-card {
  overflow: hidden;
}

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

.cover-card div,
.info-card {
  padding: 20px;
}

.cover-card p {
  color: var(--muted);
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.info-card a {
  color: var(--sky-deep);
}

.text-section {
  padding: 34px;
}

.text-section p {
  color: #334155;
  line-height: 2;
  font-size: 16px;
}

.site-footer {
  margin-top: 54px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  max-width: 520px;
}

.footer-brand strong {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  color: #ffffff;
  font-size: 20px;
}

.footer-brand p {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-content: start;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  padding: 18px 20px;
  color: #94a3b8;
}

[hidden] {
  display: none !important;
}

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

  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

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

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

  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

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

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

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

  .rank-play {
    grid-column: 2 / -1;
    justify-content: center;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
  }
}

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

  .brand-text {
    font-size: 18px;
  }

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

  .hero-search,
  .section-heading,
  .footer-links {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search button {
    width: 100%;
  }

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

  .hero-slide-content {
    left: 20px;
    right: 20px;
    bottom: 22px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .home-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .filter-selects {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .detail-article,
  .text-section {
    padding: 22px;
  }
}
