:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-strong: #eef4ff;
  --text: #101828;
  --muted: #667085;
  --line: rgba(37, 99, 235, 0.14);
  --blue: #2563eb;
  --indigo: #4f46e5;
  --pink: #ec4899;
  --gold: #f59e0b;
  --dark: #0f172a;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(37, 99, 235, 0.12),
      transparent 32rem
    ),
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 42%, #ffffff 100%);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

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(37, 99, 235, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  max-width: 1240px;
  height: 76px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

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

.brand-text span {
  display: block;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav-search {
  flex: 1;
  max-width: 430px;
  display: flex;
  align-items: center;
  padding: 4px;
  border: 2px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  border-radius: inherit;
  background: transparent;
}

.nav-search button {
  border: 0;
  padding: 9px 16px;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #344054;
  font-weight: 700;
}

.desktop-nav > a,
.nav-group > a {
  padding: 10px 0;
}

.desktop-nav a:hover {
  color: var(--blue);
}

.nav-group {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -18px;
  width: 190px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

.nav-dropdown a {
  padding: 10px 12px;
  border-radius: 12px;
}

.nav-dropdown a:hover {
  background: #eef4ff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
}

.mobile-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 700;
}

main {
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: 650px;
  background: var(--dark);
  color: #ffffff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center start;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.7s ease,
    visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transform: scale(1.03);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(15, 23, 42, 0.92) 0%,
      rgba(15, 23, 42, 0.68) 42%,
      rgba(15, 23, 42, 0.18) 100%
    ),
    radial-gradient(
      circle at 35% 30%,
      rgba(37, 99, 235, 0.58),
      transparent 34rem
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 44px));
  margin-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  padding: 58px 0 100px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.95);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

.hero-content h1,
.hero-content h2 {
  margin: 22px 0 6px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-content h3 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.08;
  color: #fde68a;
}

.hero-content p {
  max-width: 650px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.badge-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.badge-row span {
  background: #eef4ff;
  color: #1d4ed8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

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

.ghost-btn {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.hero-content .ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
  line-height: 1;
}

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

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

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

.hero-search-panel {
  position: relative;
  z-index: 4;
  max-width: 1180px;
  margin: -54px auto 0;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search-panel form {
  display: flex;
  gap: 12px;
}

.hero-search-panel input {
  flex: 1;
  min-width: 0;
  border: 2px solid #dbeafe;
  border-radius: 999px;
  padding: 15px 18px;
  outline: 0;
}

.hero-search-panel button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
}

.quick-category-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-category-row a {
  padding: 9px 13px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 800;
}

.section-shell,
.detail-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 82px 22px;
}

.section-soft {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1240px) / 2 + 22px));
  background:
    linear-gradient(
      135deg,
      rgba(219, 234, 254, 0.72),
      rgba(238, 242, 255, 0.72)
    ),
    #ffffff;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-head > a {
  color: var(--blue);
  font-weight: 900;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.09);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.56), transparent);
}

.rank-number {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 1000;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 12px 22px rgba(236, 72, 153, 0.26);
}

.movie-card-body {
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
}

.movie-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.movie-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

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

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

.movie-card--compact .poster-wrap {
  aspect-ratio: auto;
  height: 100%;
  min-height: 168px;
}

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

.movie-card--compact h2 {
  font-size: 18px;
}

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

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

.category-tile {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  display: flex;
  align-items: end;
  border-radius: 28px;
  color: #ffffff;
  background: var(--dark);
  box-shadow: var(--shadow);
}

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

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.08)),
    radial-gradient(
      circle at 18% 18%,
      rgba(37, 99, 235, 0.52),
      transparent 16rem
    );
}

.category-tile div {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.category-tile span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bfdbfe;
}

.category-tile h2 {
  margin: 8px 0 10px;
  font-size: 26px;
}

.category-tile p {
  margin: 0 0 12px;
  color: #dbeafe;
  line-height: 1.65;
}

.category-tile strong {
  color: #fde68a;
}

.page-hero {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(79, 70, 229, 0.92)),
    radial-gradient(
      circle at top right,
      rgba(236, 72, 153, 0.44),
      transparent 24rem
    );
}

.page-hero > div {
  width: min(1180px, calc(100% - 44px));
}

.page-hero p {
  max-width: 720px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.page-hero .eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.page-hero--category {
  place-items: end start;
  padding: 96px 0 64px;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 12px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 2px solid #dbeafe;
  border-radius: 16px;
  padding: 13px 14px;
  outline: 0;
  background: #ffffff;
}

.filter-empty {
  grid-column: 1 / -1;
  padding: 34px;
  border-radius: 24px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.breadcrumbs {
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475467;
  font-weight: 800;
}

.breadcrumbs a {
  color: var(--blue);
}

.detail-shell {
  padding-bottom: 44px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 32px;
  background: #dbeafe;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.detail-lead {
  color: #344054;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta span,
.tag-row span {
  background: #eef4ff;
  color: #1d4ed8;
}

.player-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 22px 76px;
}

.section-head--light {
  margin-bottom: 18px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(
    0deg,
    rgba(15, 23, 42, 0.76),
    rgba(15, 23, 42, 0.18)
  );
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 36px;
  backdrop-filter: blur(12px);
}

.player-overlay strong {
  font-size: 21px;
}

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

.detail-content {
  padding-top: 32px;
}

.detail-content article {
  padding: 32px;
  border-radius: 32px;
  background: #ffffff;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin-top: 0;
  font-size: 30px;
}

.detail-content p {
  color: #344054;
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  color: #d0d5dd;
  background: linear-gradient(135deg, #111827, #0f172a);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
}

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

.site-footer p {
  line-height: 1.8;
}

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

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

.footer-bottom {
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

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

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

  .desktop-nav {
    display: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .hero-slider {
    min-height: 680px;
  }

  .hero-content {
    padding-top: 86px;
  }

  .hero-search-panel form,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-search-panel form {
    display: grid;
  }

  .movie-grid,
  .category-grid,
  .category-grid--wide,
  .ranking-grid,
  .ranking-list,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 540px) {
  .brand-text span {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .hero-content h3 {
    font-size: 30px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .section-shell,
  .detail-shell {
    padding: 56px 16px;
  }

  .hero-search-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

  .movie-card--compact {
    display: flex;
  }

  .movie-card--compact .poster-wrap {
    min-height: 190px;
  }

  .mobile-nav {
    grid-template-columns: 1fr;
  }
}
