:root {
  --primary: #1f6feb;
  --primary-dark: #185abc;
  --secondary: #34d399;
  --accent: #fb923c;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
}

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

img,
video {
  display: block;
  width: 100%;
  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;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #60a5fa 48%, var(--secondary));
  box-shadow: 0 10px 24px rgba(31, 111, 235, 0.26);
}

.desktop-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary);
  background: #eff6ff;
}

.header-search {
  width: 250px;
}

.header-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: #334155;
  background: #f1f5f9;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

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

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.5), transparent 32%), linear-gradient(135deg, #0f172a, #1e293b 48%, #334155);
}

.hero-carousel::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(248, 250, 252, 1));
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.55;
}

.hero-glow-one {
  right: 12%;
  top: 18%;
  width: 320px;
  height: 320px;
  background: rgba(52, 211, 153, 0.25);
}

.hero-glow-two {
  left: 6%;
  bottom: 16%;
  width: 260px;
  height: 260px;
  background: rgba(251, 146, 60, 0.18);
}

.hero-track {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 130px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap: 54px;
  min-height: 470px;
}

.hero-slide.is-active {
  display: grid;
  animation: heroFade 0.55s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-kicker {
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #334155;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

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

.primary-button,
.ghost-button,
.section-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  min-height: 480px;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero-bottom {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  gap: 16px;
  transform: translateX(-50%);
}

.hero-search {
  display: flex;
  width: min(560px, 100%);
  border-radius: 18px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-search input {
  border: 0;
  color: #ffffff;
  background: transparent;
}

.hero-search input::placeholder {
  color: #bfdbfe;
}

.hero-search button {
  flex: none;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

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

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

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

.feature-strip {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: -42px;
}

.feature-strip a {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.feature-strip strong {
  font-size: 20px;
}

.feature-strip span {
  color: var(--muted);
}

.section-block {
  margin: 72px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 8px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.section-link,
.text-link {
  color: var(--primary);
  background: #eff6ff;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(31, 111, 235, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.78));
}

.play-chip,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  background: var(--primary);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  text-align: center;
  background: linear-gradient(135deg, #fb923c, #f97316);
}

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

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

.movie-meta span,
.detail-meta-row span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1f5f9;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.compact-category-grid a {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
}

.compact-category-grid span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.page-hero {
  padding: 76px 0 58px;
  background: linear-gradient(135deg, #eff6ff, #ffffff 48%, #ecfeff);
  border-bottom: 1px solid var(--line);
}

.dark-page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.dark-page-hero h1,
.dark-page-hero p {
  color: #ffffff;
}

.category-grid-large {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 54px 0;
}

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.category-cover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

.category-cover-grid img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin: 38px 0 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.detail-main {
  padding-bottom: 72px;
}

.detail-hero {
  color: #ffffff;
  background: radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.4), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b 60%, #334155);
}

.detail-layout {
  padding: 34px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: #bfdbfe;
  font-weight: 700;
}

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

.detail-info {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.4);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(40px, 6vw, 68px);
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-copy .primary-button {
  margin-top: 28px;
}

.player-section {
  margin-top: -34px;
}

.player-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-layer.is-hidden {
  display: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(31, 111, 235, 0.92);
  box-shadow: 0 22px 50px rgba(37, 99, 235, 0.36);
  font-size: 32px;
}

.player-caption {
  padding: 22px;
}

.player-caption h2,
.content-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.player-caption p,
.content-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 34px;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.related-block {
  margin-top: 54px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--primary);
}

.is-filtered-out {
  display: none;
}

@media (max-width: 1040px) {
  .header-search {
    display: none;
  }

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

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

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

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

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

  .hero-carousel {
    min-height: auto;
  }

  .hero-track {
    padding: 52px 0 150px;
  }

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

  .hero-poster {
    transform: none;
  }

  .hero-poster img {
    min-height: auto;
    max-height: 420px;
  }

  .hero-bottom {
    bottom: 42px;
    display: grid;
  }

  .feature-strip,
  .filter-panel,
  .detail-info,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .logo,
  .footer-logo {
    font-size: 17px;
  }

  .hero-search {
    display: grid;
  }

  .hero-search button {
    min-height: 42px;
  }

  .feature-strip,
  .movie-grid,
  .compact-category-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 54px 0 42px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
