html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #f8fafc;
  color: #111827;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #111827;
}

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

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

.brand-text strong {
  font-size: 21px;
  font-weight: 800;
}

.brand-text small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 12px;
  color: #475569;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #1d4ed8;
  background: #dbeafe;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #111827;
  background: #f1f5f9;
  cursor: pointer;
}

.hero-slider {
  position: relative;
  height: 64vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  width: min(720px, calc(100% - 40px));
  margin-left: max(20px, calc((100vw - 1280px) / 2 + 20px));
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32);
  backdrop-filter: blur(10px);
}

.hero-kicker span {
  color: #fde047;
}

.hero-kicker b,
.hero-kicker i {
  font-size: 14px;
  font-style: normal;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.genre-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.genre-links a,
.genre-links span {
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 14px;
}

.hero-content .primary-btn {
  margin-top: 26px;
}

.primary-btn,
.soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  padding: 13px 26px;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.34);
}

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

.primary-btn.full {
  width: 100%;
}

.soft-btn {
  padding: 10px 18px;
  color: #1d4ed8;
  background: #dbeafe;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px;
}

.home-shell {
  display: grid;
  gap: 56px;
}

.content-section {
  display: grid;
  gap: 24px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.with-actions {
  align-items: center;
}

.text-link {
  color: #2563eb;
  font-weight: 800;
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.13);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
}

.category-tile strong {
  font-size: 20px;
  font-weight: 900;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.movie-grid,
.featured-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.poster-link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  color: inherit;
}

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

.movie-card-featured .poster-wrap {
  aspect-ratio: 16 / 9;
}

.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-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 56%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.poster-badge.top {
  top: 10px;
  right: 10px;
}

.poster-badge.bottom {
  left: 10px;
  bottom: 10px;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-body strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: #2563eb;
}

.card-body em {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span:first-child {
  max-width: 65%;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f1f5f9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 3px 2px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.scroll-item {
  flex: 0 0 224px;
}

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

.rail-actions button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  color: #334155;
  font-size: 24px;
  cursor: pointer;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  color: inherit;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.13);
}

.rank-number {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  font-weight: 900;
}

.rank-thumb {
  width: 76px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: #dbeafe;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.rank-main strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-side {
  color: #64748b;
  font-weight: 700;
}

.cta-section {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 34px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.22);
}

.cta-section h2 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 900;
}

.cta-section p {
  margin: 0;
  color: #dbeafe;
}

.sub-hero,
.detail-hero {
  min-height: 310px;
  display: flex;
  align-items: flex-end;
  padding: 76px 20px 46px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  background-size: cover;
  background-position: center;
}

.sub-hero > div,
.detail-hero-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.sub-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.sub-hero h1,
.detail-hero h1 {
  max-width: 900px;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.sub-hero p,
.detail-hero p {
  max-width: 720px;
  margin: 0;
  color: #e2e8f0;
  line-height: 1.75;
}

.filter-bar {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.search-box span {
  color: #334155;
  font-weight: 850;
}

.search-box input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  color: #111827;
  background: #f8fafc;
  outline: none;
}

.search-box input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.catalog-grid {
  align-items: stretch;
}

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

.detail-hero {
  min-height: 430px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-shell {
  display: grid;
  gap: 38px;
}

.watch-card {
  margin-top: -102px;
  border-radius: 26px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 28px 62px rgba(15, 23, 42, 0.24);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  font-size: 38px;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.play-overlay:hover {
  background: rgba(0, 0, 0, 0.42);
}

.play-overlay:hover span {
  transform: scale(1.08);
}

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

.watch-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px;
}

.watch-info h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 900;
}

.watch-info p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

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

.cover-panel,
.info-panel {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.cover-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.cover-panel img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #dbeafe;
}

.info-panel {
  display: grid;
  gap: 24px;
  padding: 30px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-line span,
.meta-line a {
  padding: 8px 12px;
  border-radius: 12px;
  color: #334155;
  background: #f1f5f9;
  font-weight: 750;
}

.info-panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.info-panel p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
}

.review-box {
  padding: 24px;
  border-radius: 20px;
  background: #f8fafc;
}

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

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.footer-inner p {
  margin: 0;
  color: #94a3b8;
}

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

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

@media (max-width: 900px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  }

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

  .hero-slider {
    min-height: 520px;
    height: 70vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    width: calc(100% - 40px);
    margin: 0 auto;
  }

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

  .featured-grid,
  .detail-grid,
  .cta-section {
    grid-template-columns: 1fr;
  }

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

  .cover-panel {
    max-width: 360px;
  }

  .watch-info {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    height: 66px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .brand-text small {
    display: none;
  }

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

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .page-shell {
    padding: 34px 14px;
  }

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

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

  .scroll-item {
    flex-basis: 178px;
  }

  .rank-row {
    grid-template-columns: 34px 62px minmax(0, 1fr);
  }

  .rank-side {
    display: none;
  }

  .rank-thumb {
    width: 62px;
    height: 82px;
  }

  .watch-card {
    margin-top: -72px;
    border-radius: 20px;
  }

  .play-overlay span {
    width: 72px;
    height: 72px;
    font-size: 30px;
  }

  .watch-info,
  .info-panel {
    padding: 20px;
  }

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