:root {
  --sky: #0ea5e9;
  --sky-dark: #0284c7;
  --emerald: #10b981;
  --amber: #f59e0b;
  --ink: #171717;
  --muted: #737373;
  --line: #e5e5e5;
  --soft: #f5f7fb;
  --paper: #ffffff;
  --dark: #111827;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: #ffffff;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 229, 229, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--emerald));
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.24);
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(135deg, #0369a1, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.nav-menu-button {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: #404040;
  background: transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-menu-button:hover {
  color: var(--sky-dark);
  background: #f0f9ff;
}

.nav-menu {
  position: relative;
}

.nav-menu-panel {
  position: absolute;
  top: 48px;
  left: 0;
  display: grid;
  gap: 6px;
  min-width: 150px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
  transition: 0.2s ease;
}

.nav-menu:hover .nav-menu-panel {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.nav-menu-panel a {
  padding: 9px 10px;
  color: #525252;
  border-radius: 10px;
  font-size: 14px;
}

.nav-menu-panel a:hover {
  color: var(--sky-dark);
  background: #f0f9ff;
}

.top-search,
.mobile-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 12px 14px;
  font: inherit;
  background: transparent;
}

.top-search {
  width: min(310px, 28vw);
}

.top-search button,
.mobile-search button {
  border: 0;
  padding: 0 18px;
  color: #ffffff;
  background: var(--sky);
  cursor: pointer;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f0f9ff;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--sky-dark);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.mobile-panel-inner {
  display: grid;
  gap: 10px;
  padding: 14px 0 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--sky);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
  background: var(--sky-dark);
  transform: translateY(-2px);
}

.btn-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero {
  padding: 28px 0 44px;
  background: radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.18), transparent 36%), linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.hero-stage {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.18) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 80px);
  bottom: clamp(32px, 7vw, 90px);
  max-width: 700px;
  color: #ffffff;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--sky);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6.4vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 28px;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero .hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-rail {
  position: absolute;
  right: 24px;
  top: 50%;
  display: grid;
  gap: 12px;
  width: min(330px, 30vw);
  transform: translateY(-50%);
}

.hero-thumb {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.36);
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(12px);
  transition: 0.2s ease;
}

.hero-thumb.active,
.hero-thumb:hover {
  border-color: rgba(14, 165, 233, 0.9);
  background: rgba(14, 165, 233, 0.26);
}

.hero-thumb img {
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-thumb span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-controls {
  position: absolute;
  right: 26px;
  bottom: 24px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font-size: 28px;
}

.section {
  padding: 70px 0;
}

.section-soft {
  background: var(--soft);
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-link {
  flex: 0 0 auto;
  color: var(--sky-dark);
  font-weight: 900;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.movie-card a {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

.card-poster img {
  height: 100%;
  object-fit: cover;
  transition: 0.45s ease;
}

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

.card-badge,
.rank-mark {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.9);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.rank-mark {
  left: auto;
  right: 12px;
  background: rgba(245, 158, 11, 0.94);
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: 0.2s ease;
}

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

.card-content {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: #737373;
  font-size: 13px;
}

.card-content h2 {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #171717;
  font-size: 18px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-content p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #666666;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-horizontal a {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.movie-card-horizontal .card-poster {
  aspect-ratio: 1 / 1;
}

.movie-card-horizontal .card-content h2 {
  min-height: auto;
}

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

.category-card,
.overview-card a {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 230px;
  padding: 22px;
  color: #ffffff;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.category-card img,
.overview-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: 0.4s ease;
}

.category-card:hover img,
.overview-card:hover img {
  transform: scale(1.06);
  opacity: 0.56;
}

.category-card::after,
.overview-card a::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
}

.category-card span,
.category-card strong,
.category-card em,
.overview-card div {
  position: relative;
  z-index: 1;
}

.category-card span {
  align-self: start;
  width: fit-content;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.category-card strong {
  align-self: end;
  display: block;
  margin-top: auto;
  font-size: 23px;
}

.category-card em {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  line-height: 1.6;
}

.ranking-layout,
.ranking-page-grid,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
}

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

.spotlight-card,
.poster-panel,
.sidebar-sticky {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.spotlight-card {
  align-self: start;
  position: sticky;
  top: 100px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--emerald));
  border: 0;
}

.spotlight-card h2 {
  margin: 0 0 14px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.spotlight-card p {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #075985 52%, #047857);
}

.compact-hero {
  display: grid;
  align-items: center;
  min-height: 310px;
}

.compact-hero p {
  color: rgba(255, 255, 255, 0.84);
}

.category-hero img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.page-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18));
}

.page-hero-content {
  position: relative;
  z-index: 1;
  padding: 82px 0;
}

.filter-bar {
  margin-bottom: 26px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.filter-bar input {
  border: 1px solid var(--line);
  border-radius: 14px;
}

.overview-card div {
  align-self: end;
}

.overview-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.overview-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.overview-card p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-links a {
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 12px;
}

.detail-topbar {
  background: #111827;
  color: #ffffff;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  overflow: hidden;
  white-space: nowrap;
}

.breadcrumbs a {
  color: #bae6fd;
}

.breadcrumbs strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-layout {
  align-items: start;
  padding-top: 36px;
  padding-bottom: 58px;
}

.detail-main {
  display: grid;
  gap: 28px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.2);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16));
  cursor: pointer;
  transition: 0.22s ease;
}

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

.player-start {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.86);
  cursor: pointer;
  font-size: 32px;
  box-shadow: 0 16px 35px rgba(14, 165, 233, 0.34);
}

.player-overlay span {
  font-size: 18px;
  font-weight: 900;
}

.detail-copy {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.detail-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0;
  color: #404040;
  font-size: 17px;
  line-height: 1.9;
}

.detail-copy .lead {
  margin-bottom: 16px;
  color: #171717;
  font-size: 20px;
  font-weight: 700;
}

.detail-aside {
  position: sticky;
  top: 100px;
}

.poster-panel img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: #0f172a;
}

.poster-panel h2 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.poster-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.search-hero {
  min-height: 360px;
}

.search-page-form {
  display: flex;
  max-width: 760px;
  gap: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
}

.search-page-form input {
  color: #ffffff;
}

.search-page-form input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.search-status {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  padding: 54px 0 0;
  color: #d4d4d4;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #ffffff;
  font-size: 23px;
}

.site-footer p {
  max-width: 520px;
  color: #a3a3a3;
  line-height: 1.75;
}

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

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

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

.footer-bottom {
  margin-top: 42px;
  padding: 20px 0;
  color: #a3a3a3;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

  .hero-rail {
    display: none;
  }
}

@media (max-width: 960px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

  .detail-aside,
  .spotlight-card,
  .sidebar-sticky {
    position: static;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 22px, 1280px);
  }

  .header-inner {
    min-height: 66px;
  }

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

  .hero {
    padding: 12px 0 28px;
  }

  .hero-stage {
    width: min(100% - 18px, 1280px);
    min-height: 520px;
    border-radius: 22px;
  }

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

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

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

  .hero-controls {
    display: none;
  }

  .section {
    padding: 46px 0;
  }

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 12px;
  }

  .movie-grid-6,
  .movie-grid-5,
  .movie-grid-4,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-content {
    padding: 12px;
  }

  .card-content h2 {
    min-height: 46px;
    font-size: 16px;
  }

  .movie-card-horizontal a {
    grid-template-columns: 112px 1fr;
  }

  .category-card,
  .overview-card a {
    min-height: 210px;
    padding: 18px;
  }

  .page-hero-content {
    padding: 58px 0;
  }

  .detail-layout {
    padding-top: 20px;
  }

  .detail-copy {
    padding: 20px;
  }

  .player-start {
    width: 68px;
    height: 68px;
  }

  .search-page-form {
    display: grid;
  }
}

@media (max-width: 460px) {
  .movie-grid-6,
  .movie-grid-5,
  .movie-grid-4,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal a {
    grid-template-columns: 96px 1fr;
  }
}
