:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #172554;
  --blue-2: #1e3a8a;
  --amber: #f59e0b;
  --rose: #e11d48;
  --cyan: #0891b2;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1220px, 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;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--amber));
  box-shadow: 0 12px 28px rgba(30, 58, 138, 0.25);
}

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

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 8px;
}

.desktop-nav {
  display: flex;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: var(--blue);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 20px;
  background: var(--surface-soft);
  flex-wrap: wrap;
}

.mobile-nav.is-open {
  display: flex;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  background: linear-gradient(135deg, #172554 0%, #0f172a 52%, #451a03 100%);
  color: #ffffff;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: 56px;
  padding: 72px 0 96px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-bg {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -2;
  overflow: hidden;
  opacity: 0.28;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.9));
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.pill {
  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.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.ghost-button,
.section-more,
.quick-search button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
}

.primary-button,
.quick-search button {
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 18px 35px rgba(245, 158, 11, 0.25);
  border: 0;
}

.primary-button:hover,
.quick-search button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-art {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 26px;
  z-index: 1;
  pointer-events: none;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  width: min(1220px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  background: rgba(255, 255, 255, 0.32) !important;
}

.hero-dot.is-active {
  width: 34px !important;
  background: #fbbf24 !important;
}

.quick-search-block,
.content-section,
.filter-panel,
.page-hero,
.detail-hero,
.watch-layout {
  width: min(1220px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-block {
  margin-top: -46px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 24px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-block h2,
.section-heading h2,
.page-hero h1,
.detail-title-row h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-search-block h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.quick-search-block p,
.section-heading p,
.page-hero p,
.detail-title-row p {
  color: var(--muted);
  line-height: 1.75;
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.stat-strip {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-strip span {
  padding: 12px 14px;
  border-radius: 16px;
  color: #334155;
  background: var(--surface-soft);
}

.stat-strip strong {
  color: var(--blue);
  font-size: 20px;
}

.content-section {
  padding: 64px 0;
}

.warm-section,
.blue-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1220px) / 2));
  padding-right: max(16px, calc((100% - 1220px) / 2));
}

.warm-section {
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.blue-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p {
  margin: 8px 0 0;
}

.section-more,
.text-link {
  color: #ffffff;
  background: var(--blue);
}

.section-more:hover,
.text-link:hover {
  background: var(--blue-2);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  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.05);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.75));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #0f172a;
  background: #fbbf24;
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #e11d48, #f97316);
}

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

.movie-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  min-height: 52px;
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.42;
}

.movie-card h3 a:hover {
  color: var(--blue-2);
}

.movie-card p {
  min-height: 72px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.tag-row span,
.pill {
  color: #334155;
  background: #e2e8f0;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius-lg);
  background: #0f172a;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile span {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.88));
}

.category-tile strong,
.category-tile em {
  display: block;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile em {
  margin-top: 6px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
}

.feature-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.feature-cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 24px;
}

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

.feature-body h3 {
  margin: 14px 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.05em;
}

.feature-body p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.page-hero,
.detail-hero {
  margin-top: 34px;
  padding: 54px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background: linear-gradient(135deg, #172554, #0f172a 54%, #7c2d12);
  box-shadow: var(--shadow);
}

.page-hero h1,
.detail-title-row h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.page-hero p,
.detail-title-row p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.filter-panel {
  margin-top: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(160px, 0.28fr));
  gap: 14px;
}

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

.filter-count {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 800;
}

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

.category-overview-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.category-cover-row img {
  height: 140px;
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
}

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

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

.rank-panel {
  padding-bottom: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 74px minmax(0, 1fr) 72px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-row:hover {
  border-color: #fbbf24;
}

.rank-number {
  font-size: 20px;
  font-weight: 900;
  color: var(--rose);
}

.rank-row img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-title strong,
.rank-title em {
  display: block;
}

.rank-title em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
}

.rank-score {
  justify-self: end;
  padding: 8px 12px;
  border-radius: 999px;
  color: #0f172a;
  background: #fbbf24;
  font-weight: 900;
}

.archive-section {
  display: grid;
  gap: 28px;
}

.archive-year {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.archive-year h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.archive-links {
  columns: 3 280px;
  column-gap: 22px;
}

.archive-link {
  break-inside: avoid;
  display: block;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.archive-link span,
.archive-link em {
  display: block;
}

.archive-link span {
  font-weight: 900;
}

.archive-link em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

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

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 34px 0 70px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #ffffff;
  background: #020617;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.player-cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.player-cover strong {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: #0f172a;
  background: #fbbf24;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  font-size: 32px;
}

.detail-article,
.sidebar-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

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

.detail-meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-meta div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-meta dt {
  color: var(--muted);
  font-weight: 900;
}

.detail-meta dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
}

.related-card:hover {
  background: #e0f2fe;
}

.related-card img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.related-card strong,
.related-card em {
  display: block;
}

.related-card em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
}

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

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 620px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

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

  .watch-layout {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-art {
    max-width: 360px;
    justify-self: center;
  }

  .quick-search-block,
  .feature-card,
  .filter-grid,
  .detail-title-row,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .quick-search-block,
  .detail-title-row,
  .footer-inner,
  .section-heading {
    display: grid;
  }

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

@media (max-width: 640px) {
  .header-inner,
  .quick-search-block,
  .content-section,
  .filter-panel,
  .page-hero,
  .detail-hero,
  .watch-layout,
  .footer-inner {
    width: min(100% - 24px, 1220px);
  }

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

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

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

  .quick-search {
    display: grid;
  }

  .catalog-grid,
  .home-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card h3 {
    min-height: 46px;
    font-size: 15px;
  }

  .movie-card p {
    min-height: 66px;
    font-size: 12px;
  }

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

  .page-hero,
  .detail-hero {
    padding: 32px 22px;
  }

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

  .rank-row img {
    width: 56px;
    height: 74px;
  }

  .rank-score {
    display: none;
  }

  .player-cover strong {
    width: 66px;
    height: 66px;
  }
}
