* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #e5e7eb;
  background: #020617;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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(30, 41, 59, 0.9);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  color: #ffffff;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
  font-size: 14px;
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.header-search input,
.catalog-controls input,
.catalog-controls select {
  width: 100%;
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 12px;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.95);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  min-height: 42px;
  padding: 0 14px;
}

.header-search input:focus,
.catalog-controls input:focus,
.catalog-controls select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.header-search button,
.primary-button,
.ghost-button,
.full-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.primary-button {
  color: #ffffff;
  background: #2563eb;
}

.header-search button:hover,
.primary-button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.6);
}

.ghost-button:hover {
  border-color: rgba(59, 130, 246, 0.7);
  background: rgba(30, 41, 59, 0.86);
}

.primary-button.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.8);
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
}

.hero-backdrop::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.25), transparent 36%), linear-gradient(180deg, rgba(2, 6, 23, 0.12), #020617 94%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 56px;
  min-height: 660px;
  padding: 84px 0 110px;
}

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

.eyebrow,
.breadcrumb {
  color: #60a5fa;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.breadcrumb {
  margin-bottom: 16px;
  color: #93c5fd;
  font-size: 14px;
}

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

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 18px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-copy .one-line {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 19px;
}

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

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
}

.hero-tags span {
  padding: 6px 12px;
  font-size: 14px;
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-4px);
}

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

.hero-poster span,
.play-pill {
  position: absolute;
  right: 16px;
  bottom: 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.95);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
  font-weight: 700;
}

.hero-poster span {
  padding: 8px 14px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 42px;
  left: 0;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(148, 163, 184, 0.4);
}

.hero-dot.active {
  background: #3b82f6;
}

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

.slate-panel {
  background: rgba(15, 23, 42, 0.55);
}

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

.section-heading h2,
.ranking-box h2,
.synopsis-card h2,
.info-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: #94a3b8;
}

.section-link {
  flex: 0 0 auto;
  color: #60a5fa;
  font-weight: 700;
}

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

.latest-grid,
.related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.95);
  border-radius: 18px;
  background: #0f172a;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  transform: translateY(-4px);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.85));
  opacity: 0.9;
}

.play-pill {
  z-index: 2;
  padding: 5px 10px;
  font-size: 13px;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.95);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.card-content {
  padding: 16px;
}

.compact-card .card-content {
  padding: 14px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card h3 {
  min-height: auto;
  font-size: 16px;
}

.movie-card h3 a:hover {
  color: #93c5fd;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  padding: 4px 8px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.category-tile,
.category-overview-card,
.ranking-box,
.synopsis-card,
.info-card {
  border: 1px solid rgba(30, 41, 59, 0.95);
  border-radius: 20px;
  background: #0f172a;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.category-tile {
  position: relative;
  display: block;
  min-height: 230px;
  overflow: hidden;
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92));
}

.category-tile div {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 22px;
}

.category-tile strong,
.category-overview-card h2 {
  display: block;
  color: #ffffff;
  font-size: 22px;
}

.category-tile span {
  display: inline-block;
  margin-top: 6px;
  color: #93c5fd;
  font-weight: 700;
}

.category-tile p,
.category-overview-card p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
}

.ranking-box {
  align-self: start;
  padding: 24px;
}

.ranking-box .movie-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.ranking-box .poster-link img {
  height: 138px;
}

.ranking-box .movie-card p,
.ranking-box .tag-row {
  display: none;
}

.full-link {
  width: 100%;
  margin-top: 18px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.86);
}

.page-hero {
  padding: 72px 0 20px;
}

.page-hero > div {
  max-width: 860px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 190px;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(30, 41, 59, 0.95);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
}

.catalog-controls label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.catalog-controls input,
.catalog-controls select {
  min-height: 44px;
  padding: 0 12px;
}

.filter-count {
  min-height: 24px;
  margin: 0 0 22px;
  color: #93c5fd;
}

.category-overview-card {
  overflow: hidden;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: #020617;
}

.category-cover-row img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.category-overview-body {
  padding: 22px;
}

.category-overview-card h2 {
  margin: 8px 0;
}

.category-overview-card .primary-button {
  margin-top: 16px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: #020617;
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: 42px;
  min-height: 680px;
  padding: 64px 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.42));
}

.play-overlay span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.36);
  font-size: 34px;
  text-indent: 5px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover span {
  background: #1d4ed8;
  transform: scale(1.06);
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
  align-items: start;
  gap: 22px;
}

.synopsis-card,
.info-card {
  padding: 24px;
}

.synopsis-card p {
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 16px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 18px 0 0;
}

.info-card dt {
  color: #93c5fd;
  font-weight: 700;
}

.info-card dd {
  margin: 0;
  color: #e5e7eb;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 44px 0;
}

.footer-grid p {
  max-width: 380px;
  color: #94a3b8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
  font-size: 14px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

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

  .two-column-section,
  .detail-content,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    padding-top: 44px;
  }
}

@media (max-width: 860px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

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

  .nav-menu {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid rgba(30, 41, 59, 0.95);
    border-radius: 16px;
    background: #0f172a;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
  }

  .header-search {
    order: 4;
    width: 100%;
    min-width: 0;
  }

  .hero,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 48px;
  }

  .hero-poster {
    width: min(270px, 72vw);
    margin: 0 auto;
  }

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

  .movie-grid,
  .catalog-grid,
  .ranking-list,
  .latest-grid,
  .related-grid,
  .small-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .catalog-controls {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

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

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

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p,
  .detail-copy .one-line {
    font-size: 16px;
  }

  .movie-grid,
  .catalog-grid,
  .ranking-list,
  .latest-grid,
  .related-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .card-content {
    padding: 12px;
  }

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

  .movie-card p,
  .tag-row {
    display: none;
  }

  .detail-hero,
  .detail-layout {
    min-height: auto;
  }

  .detail-layout {
    padding: 30px 0 44px;
  }

  .play-overlay span {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }

  .synopsis-card,
  .info-card,
  .ranking-box {
    padding: 18px;
  }

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

.plain-link-list {
  columns: 3 260px;
  padding: 24px;
  border: 1px solid rgba(30, 41, 59, 0.95);
  border-radius: 20px;
  background: #0f172a;
}

.plain-link-list li {
  break-inside: avoid;
  margin: 0 0 10px 18px;
  color: #cbd5e1;
}

.plain-link-list a:hover {
  color: #93c5fd;
}
