:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --slate: #0f172a;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(37, 99, 235, 0.10);
}

body {
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 46%, #f1f5f9 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.container {
  width: min(1180px, 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(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 18px;
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
  font-size: 18px;
}

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

.brand-text strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: #334155;
  border-radius: 12px;
  font-weight: 650;
  font-size: 14px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
  background: #eff6ff;
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: #334155;
  border-radius: 99px;
}

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

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  background: #f8fafc;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, rgba(15, 23, 42, 0.42) 52%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 76px;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.hero-summary {
  max-width: 650px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

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

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

.hero-tags span,
.detail-tags span,
.card-tags a {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.92);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

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

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

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

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

.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-dark), #0e7490);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 36px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.22s ease, background 0.22s ease;
}

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

.page-main {
  min-height: calc(100vh - 280px);
}

.intro-block,
.content-section,
.detail-content {
  margin-top: 48px;
}

.intro-block {
  padding: 30px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}

.intro-block h2,
.section-heading h2,
.player-section h2,
.text-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.intro-block p,
.section-heading p,
.compact-hero p,
.text-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

.search-label {
  font-weight: 850;
  color: #1e293b;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  outline: none;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.search-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 9px 14px;
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #dbeafe;
  font-weight: 750;
}

.chip.is-active,
.chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.section-more {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 850;
}

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

.movie-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.movie-card.is-hidden {
  display: none;
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

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

.play-mark,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.play-mark {
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 12px;
  font-weight: 900;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-title {
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  padding: 5px 8px;
  background: #f1f5f9;
  border-radius: 9px;
}

.card-body p {
  display: -webkit-box;
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 20px;
  color: #ffffff;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
  isolation: isolate;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.9));
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span {
  display: block;
  margin-top: 76px;
  font-size: 23px;
  font-weight: 900;
}

.category-card p,
.category-card em {
  display: block;
  margin: 10px 0 0;
  color: #dbeafe;
  font-style: normal;
  line-height: 1.65;
}

.category-wide {
  min-height: 260px;
}

.category-wide span {
  margin-top: 112px;
}

.compact-hero {
  margin-top: 36px;
  padding: 38px;
  color: #ffffff;
  border-radius: 30px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.9), rgba(15, 23, 42, 0.95) 58%), linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.compact-hero p {
  max-width: 820px;
  color: #dbeafe;
}

.compact-hero .search-label {
  color: #ffffff;
}

.empty-state {
  display: none;
  margin: 24px 0 0;
  padding: 20px;
  color: #475569;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(7px);
  transform: scale(1.04);
  opacity: 0.46;
}

.detail-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  padding: 34px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: #bfdbfe;
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

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

.detail-meta {
  margin: 22px 0;
}

.detail-meta span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-line {
  max-width: 840px;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

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

.player-section {
  scroll-margin-top: 100px;
}

.player-box {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 28px;
  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;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.82));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 4px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.36);
}

.player-cover strong {
  font-size: 22px;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
}

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

.text-panel {
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
}

.text-panel p {
  margin-bottom: 0;
  color: #334155;
}

.site-footer {
  margin-top: 70px;
  color: #dbeafe;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 22px;
}

.footer-main p {
  max-width: 600px;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #93c5fd;
  font-size: 17px;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: #cbd5e1;
}

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

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

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .nav-shell {
    height: 68px;
  }

  .hero {
    height: 520px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid {
    grid-template-columns: 160px 1fr;
    gap: 22px;
  }
}

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

  .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 62px;
  }

  .intro-block,
  .compact-hero,
  .text-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 220px;
  }

  .player-box {
    border-radius: 18px;
  }
}
