* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fafaf9;
  color: #292524;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.container-custom {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e7e5e4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #1c1917;
  white-space: nowrap;
}

.brand {
  font-size: 20px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #059669);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.32);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #57534e;
  font-size: 14px;
  font-weight: 600;
}

.nav-links a:hover,
.nav-group-button:hover {
  color: #0284c7;
}

.nav-group {
  position: relative;
}

.nav-group-button {
  border: 0;
  background: transparent;
  color: #57534e;
  cursor: pointer;
  font-weight: 600;
}

.nav-dropdown {
  position: absolute;
  right: 0;
  top: 34px;
  min-width: 140px;
  display: none;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e7e5e4;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.nav-dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
}

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

.nav-group:hover .nav-dropdown {
  display: block;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-search input,
.filter-form input,
.search-page-form input {
  width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  padding: 9px 12px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-form input:focus,
.search-page-form input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px #0ea5e9;
}

.nav-search button {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  color: #ffffff;
  background: #0284c7;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f5f5f4;
  cursor: pointer;
  font-size: 22px;
}

.btn-primary,
.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: #0284c7;
}

.btn-primary:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.btn-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.28);
}

.card {
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0c0a09;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  max-width: 1280px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  width: min(760px, 100%);
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  width: min(680px, 100%);
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-tags,
.detail-tags,
.movie-meta,
.tag-cloud {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.movie-meta span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.62);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.4), transparent 28%), linear-gradient(135deg, #0c4a6e, #1c1917 62%, #064e3b);
}

.compact-hero .container-custom {
  padding-top: 70px;
  padding-bottom: 70px;
}

.compact-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
}

.compact-hero p {
  width: min(760px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.section-block {
  padding: 48px 0;
}

.section-block.bg-soft {
  background: #f5f5f4;
}

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

.section-head h2 {
  margin: 0;
  color: #1c1917;
  font-size: 28px;
  line-height: 1.2;
}

.scroll-actions {
  display: flex;
  gap: 8px;
}

.scroll-actions button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f4;
  color: #44403c;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.scroll-actions button:hover {
  background: #e7e5e4;
}

.row-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.row-scroll::-webkit-scrollbar {
  display: none;
}

.row-item {
  flex: 0 0 288px;
  scroll-snap-align: start;
}

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

.movie-card {
  display: block;
  color: #1c1917;
}

.movie-card:hover {
  transform: translateY(-3px);
}

.poster {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: #1c1917;
}

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

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

.poster-year {
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 8px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  font-size: 12px;
  font-weight: 700;
}

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

.movie-card-body h3,
.large-caption h3,
.ranking-item h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-body p,
.large-caption p,
.ranking-item p {
  display: -webkit-box;
  margin: 0 0 12px;
  color: #78716c;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta span {
  background: #f5f5f4;
  color: #78716c;
}

.movie-meta.light span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 148px;
}

.poster-wide {
  height: 100%;
}

.movie-card-large .poster-large {
  height: 420px;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.large-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  color: #ffffff;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
}

.feature-side {
  display: grid;
  gap: 22px;
}

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

.category-card {
  color: #292524;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 132px;
  background: #1c1917;
}

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

.category-card-body {
  padding: 18px;
}

.category-card-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card-body p {
  margin: 0 0 14px;
  color: #78716c;
  font-size: 14px;
}

.category-card-body span {
  color: #0284c7;
  font-weight: 700;
}

.category-toolbar {
  padding: 22px 0;
  background: #ffffff;
  border-bottom: 1px solid #e7e5e4;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.category-tabs a {
  border-radius: 10px;
  padding: 9px 14px;
  color: #57534e;
  background: #f5f5f4;
  font-weight: 700;
}

.category-tabs a.is-active,
.category-tabs a:hover {
  color: #ffffff;
  background: #0284c7;
}

.filter-form,
.search-page-form {
  display: flex;
  gap: 12px;
}

.search-page-form {
  width: min(680px, 100%);
  margin-top: 26px;
}

.ranking-wrap {
  max-width: 980px;
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item a {
  display: grid;
  grid-template-columns: 58px 132px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: #0284c7;
  font-weight: 900;
}

.ranking-item img {
  width: 132px;
  height: 82px;
  border-radius: 10px;
  object-fit: cover;
}

.detail-hero {
  padding: 50px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0c4a6e, #1c1917 64%, #064e3b);
}

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

.detail-poster img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-title-wrap h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
}

.detail-title-wrap p {
  width: min(760px, 100%);
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.detail-tags {
  margin-bottom: 14px;
  color: #ffffff;
}

.tag-cloud {
  margin-bottom: 26px;
}

.tag-cloud span {
  background: #f0f9ff;
  color: #0369a1;
}

.watch-section {
  padding: 42px 0 0;
}

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

.player-card {
  position: relative;
  background: #000000;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

.play-layer span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
  font-size: 28px;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.watch-side {
  padding: 22px;
}

.watch-side h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.watch-side dl {
  margin: 0;
}

.watch-side dl div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f4;
}

.watch-side dt {
  color: #78716c;
}

.watch-side dd {
  margin: 0;
  color: #292524;
  font-weight: 700;
}

.detail-copy-wrap {
  padding-top: 36px;
}

.detail-copy {
  padding: 28px;
}

.detail-copy h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 24px;
  color: #57534e;
  font-size: 16px;
}

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

.empty-state {
  margin: 30px 0 0;
  padding: 28px;
  border-radius: 14px;
  background: #ffffff;
  color: #78716c;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.site-footer {
  margin-top: 54px;
  background: #1c1917;
  color: #d6d3d1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding-top: 48px;
  padding-bottom: 30px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  margin: 0;
  color: #a8a29e;
}

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

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

.footer-links a {
  color: #d6d3d1;
  font-size: 14px;
}

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

.footer-bottom {
  padding: 24px 16px;
  border-top: 1px solid #292524;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

  .watch-side {
    order: -1;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  }

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

  .nav-dropdown {
    position: static;
    display: grid;
    box-shadow: none;
    margin-top: 8px;
  }

  .nav-search {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .hero-slider {
    height: 540px;
  }

  .hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-control {
    display: none;
  }

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

  .feature-grid,
  .detail-hero-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(320px, 100%);
  }

  .ranking-item a {
    grid-template-columns: 44px 102px 1fr;
    gap: 12px;
  }

  .ranking-item img {
    width: 102px;
    height: 70px;
  }
}

@media (max-width: 540px) {
  .container-custom {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand {
    font-size: 18px;
  }

  .hero-slider {
    height: 500px;
  }

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

  .hero-actions,
  .filter-form,
  .search-page-form {
    display: grid;
    width: 100%;
  }

  .section-block {
    padding: 36px 0;
  }

  .section-head h2 {
    font-size: 23px;
  }

  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .poster {
    height: 220px;
  }

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

  .ranking-item a {
    grid-template-columns: 42px 1fr;
  }

  .ranking-item img {
    display: none;
  }

  .watch-side dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
