:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #ecfeff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --dark: #0f172a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.14), transparent 34rem), var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.logo-text {
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--cyan);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.header-search input,
.hero-search input,
.mobile-nav input,
.filter-toolbar input,
.filter-toolbar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 11px 14px 11px 18px;
}

.header-search button,
.hero-search button,
.mobile-nav button {
  margin-right: 4px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.search-suggest {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-suggest.is-open {
  display: block;
}

.search-suggest a {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.search-suggest a:last-child {
  border-bottom: 0;
}

.search-suggest strong {
  font-size: 14px;
}

.search-suggest span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #ffffff;
  background: var(--dark);
}

.mobile-nav {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-nav form {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #06b6d4, #2563eb 58%, #0891b2);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.18;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.35);
  transform: scale(1.06);
}

.hero-backdrop::after,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(8, 47, 73, 0.92), rgba(14, 116, 144, 0.42), rgba(30, 64, 175, 0.68));
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  min-height: 560px;
  padding-top: 70px;
  padding-bottom: 84px;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.page-hero p {
  margin: 0 0 14px;
  color: #cffafe;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy h2 {
  margin: 22px 0 12px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.26);
}

.btn.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
}

.btn.small {
  min-height: 38px;
  padding: 0 15px;
  font-size: 13px;
}

.hero-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 32px;
  background: linear-gradient(145deg, #0e7490, #1d4ed8);
  box-shadow: 0 28px 70px rgba(8, 47, 73, 0.46);
}

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

.hero-media:hover img {
  transform: scale(1.06);
}

.hero-play,
.play-chip {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.hero-play {
  right: 22px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  font-size: 24px;
}

.hero-footer {
  position: absolute;
  right: 0;
  bottom: 26px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(520px, 100%);
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.hero-search input {
  padding: 0 16px;
  color: #ffffff;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

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

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

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

.section {
  padding: 58px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--cyan);
  font-weight: 900;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -42px;
  padding: 0;
  position: relative;
  z-index: 4;
}

.stats-band div {
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.stats-band strong {
  display: block;
  color: var(--blue);
  font-size: 30px;
}

.stats-band span {
  color: var(--muted);
  font-weight: 700;
}

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

.category-tile,
.category-overview,
.content-card,
.podium-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.category-tile {
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.podium-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #0e7490;
  background: #cffafe;
  font-weight: 900;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-tile p,
.category-tile div a,
.card-desc,
.card-meta,
.detail-one-line,
.content-card p,
.footer-grid p,
.footer-bottom,
.page-hero span {
  color: var(--muted);
}

.category-tile div {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card[hidden] {
  display: none;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 88px 1fr;
  min-height: 132px;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, #0891b2, #1d4ed8);
}

.compact .poster-wrap {
  height: 100%;
  aspect-ratio: auto;
}

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

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

.poster-fallback {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  padding: 14px;
  color: #ffffff;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(145deg, #0891b2, #1e40af);
}

.poster-missing .poster-fallback,
.poster-wrap.poster-missing .poster-fallback {
  display: grid;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 18px rgba(239, 68, 68, 0.28);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--text);
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--cyan);
}

.card-meta {
  margin: 8px 0;
  font-size: 12px;
}

.card-desc {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.compact .card-desc {
  display: none;
}

.tag-row span {
  color: #0e7490;
  background: #ecfeff;
}

.page-main {
  padding-bottom: 40px;
}

.page-hero {
  padding: 70px 0 34px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.page-hero p {
  color: var(--cyan);
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

.filter-toolbar input,
.filter-toolbar select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.filter-count {
  margin: 0;
  color: var(--cyan);
  font-weight: 900;
}

.category-overview-list {
  display: grid;
  gap: 22px;
}

.category-overview {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-overview h2 {
  margin: 0;
  font-size: 28px;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 10px;
}

.podium-card {
  display: grid;
  gap: 12px;
  min-height: 230px;
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #0891b2, #1d4ed8);
}

.podium-card strong {
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.podium-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
}

.podium-card p,
.podium-card span {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.22);
  transform: scale(1.08);
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  min-height: 520px;
  padding-top: 62px;
  padding-bottom: 62px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb em {
  font-style: normal;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 780px;
  margin: 18px 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-tags a {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.28);
}

.player-section {
  padding-bottom: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.44));
}

.player-overlay span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 999px;
  font-size: 34px;
  background: rgba(6, 182, 212, 0.92);
  box-shadow: 0 22px 40px rgba(6, 182, 212, 0.34);
}

.player-overlay.is-hidden {
  display: none;
}

.player-message {
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  margin: 0;
  color: #ffffff;
  text-align: center;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.content-card {
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  line-height: 1.85;
}

.facts-card {
  grid-column: 1 / -1;
}

.facts-card dl {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 18px;
  margin: 0;
}

.facts-card dt {
  color: var(--muted);
  font-weight: 900;
}

.facts-card dd {
  margin: 0;
}

.next-prev {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 0;
  padding-bottom: 0;
}

.next-prev a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--blue);
  background: #ffffff;
  font-weight: 900;
}

.standalone {
  max-width: 880px;
}

.site-footer {
  margin-top: 44px;
  padding: 46px 0 24px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

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

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

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.footer-grid a:hover,
.footer-bottom a:hover {
  color: #67e8f9;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

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

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

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

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

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

  .hero-media,
  .detail-poster {
    width: min(320px, 82vw);
  }

  .hero-footer,
  .section-head,
  .category-overview-head,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-band,
  .category-grid,
  .ranking-grid,
  .podium-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .logo-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .hero-grid {
    gap: 24px;
    padding-top: 42px;
  }

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

  .hero-footer {
    bottom: 16px;
  }

  .hero-search {
    border-radius: 22px;
  }

  .hero-search button {
    white-space: nowrap;
  }

  .stats-band,
  .category-grid,
  .movie-grid,
  .ranking-grid,
  .podium-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    grid-template-columns: 104px 1fr;
  }

  .detail-layout {
    min-height: auto;
    padding-top: 38px;
    padding-bottom: 38px;
  }

  .facts-card dl {
    grid-template-columns: 1fr;
  }
}
