:root {
  --bg-page: #f8fafc;
  --bg-soft: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-soft: #e2e8f0;
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --brand-soft: #e0f2fe;
  --accent: #f59e0b;
  --border: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh;
}

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;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.28);
}

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

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  margin-top: 4px;
  color: #7dd3fc;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  border-radius: 10px;
  color: #e2e8f0;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
  background: #0284c7;
  color: #ffffff;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

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

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 650;
}

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

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-shell {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
}

.hero p {
  max-width: 720px;
  margin: 0 0 32px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.78;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-button,
.secondary-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  padding: 15px 26px;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.28);
}

.secondary-button {
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.secondary-button:hover,
.filter-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow);
}

.hero-panel {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.hero-panel-grid {
  display: grid;
  gap: 14px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-mini:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.14);
}

.hero-mini img {
  width: 96px;
  height: 66px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-mini strong {
  display: block;
  margin-bottom: 5px;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-mini span {
  display: block;
  color: #bae6fd;
  font-size: 13px;
}

.section {
  padding: 72px 0;
}

.section.white {
  background: #ffffff;
}

.section.soft {
  background: linear-gradient(135deg, #f8fafc, #e0f2fe);
}

.section.slate {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.carousel-actions {
  display: flex;
  gap: 10px;
}

.carousel-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  cursor: pointer;
  font-size: 20px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.carousel-button:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.movie-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 2px 0 18px;
  scrollbar-width: none;
}

.movie-row::-webkit-scrollbar {
  display: none;
}

.movie-row .movie-card {
  flex: 0 0 320px;
}

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

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

.feature-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 24px;
}

.movie-card,
.wide-card,
.category-card,
.rank-item,
.info-card {
  background: var(--bg-card);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.wide-card:hover,
.category-card:hover,
.rank-item:hover,
.info-card:hover {
  transform: translateY(-4px);
  border-color: #bae6fd;
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img,
.wide-poster img,
.rank-poster img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-link img,
.wide-card:hover .wide-poster img,
.rank-item:hover .rank-poster img,
.detail-cover:hover img {
  transform: scale(1.06);
}

.poster-badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  font-size: 12px;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.movie-card-body,
.wide-body {
  padding: 18px;
}

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

.movie-card h3,
.wide-card h3,
.rank-item h3 {
  margin: 9px 0 8px;
  color: var(--text-main);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

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

.tag-row span,
.pill {
  padding: 6px 10px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
}

.wide-poster {
  min-height: 210px;
  overflow: hidden;
  background: #0f172a;
}

.text-action {
  display: inline-flex;
  margin-top: 16px;
  color: var(--brand);
  font-weight: 900;
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 34px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-pill:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow);
}

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

.category-card {
  padding: 24px;
}

.category-card h2,
.info-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.75;
}

.category-count {
  color: var(--brand);
  font-size: 14px;
  font-weight: 900;
}

.rank-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 64px 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-no {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  font-weight: 950;
}

.rank-poster {
  display: block;
  height: 94px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}

.filter-panel {
  margin: 0 0 30px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.8fr auto;
  gap: 16px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 900;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text-main);
  background: #f8fafc;
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.filter-button {
  min-height: 46px;
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--text-muted);
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.empty-state.show {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 750;
  margin: 0 0 22px;
}

.breadcrumb a {
  color: var(--brand);
}

.detail-hero {
  padding: 48px 0 72px;
  background: linear-gradient(135deg, #020617, #0f172a 52%, #075985);
  color: #ffffff;
}

.detail-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 36px;
  align-items: start;
}

.detail-cover {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  aspect-ratio: 16 / 11;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-content p {
  color: #e2e8f0;
  line-height: 1.84;
  font-size: 17px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 800;
  font-size: 13px;
}

.player-section {
  padding: 60px 0;
  background: #020617;
}

.player-wrap {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.player-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: #ffffff;
}

.player-title h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 950;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.4);
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(2, 132, 199, 0.2), rgba(0, 0, 0, 0.48));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  font-size: 34px;
  box-shadow: 0 18px 46px rgba(2, 132, 199, 0.36);
  transform: translateX(2px);
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.info-card {
  padding: 26px;
}

.info-card + .info-card {
  margin-top: 22px;
}

.info-card p {
  font-size: 16px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.side-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.side-link img {
  width: 82px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.side-link strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.side-link span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 34px 0;
}

.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
}

.footer-shell p {
  max-width: 760px;
  margin: 0;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
  justify-content: flex-end;
  min-width: 260px;
}

.footer-links a {
  color: #7dd3fc;
  font-weight: 800;
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-shell,
  .detail-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 680px;
  }

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

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

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

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

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

  .brand-subtitle {
    display: none;
  }

  .hero,
  .hero-shell {
    min-height: auto;
  }

  .hero-shell {
    padding: 64px 0 42px;
  }

  .hero-panel {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .section-head,
  .footer-shell {
    display: grid;
    align-items: start;
  }

  .footer-links {
    justify-content: flex-start;
    min-width: 0;
  }

  .movie-grid,
  .movie-grid.search-grid,
  .category-grid,
  .feature-grid,
  .wide-list {
    grid-template-columns: 1fr;
  }

  .movie-row .movie-card {
    flex-basis: 280px;
  }

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

  .wide-poster,
  .rank-poster {
    min-height: 180px;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .rank-no {
    position: absolute;
    margin: 10px;
    z-index: 2;
  }

  .rank-item {
    position: relative;
  }

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

  .detail-hero {
    padding: 34px 0 48px;
  }

  .player-title h2 {
    font-size: 24px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
