:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: linear-gradient(135deg, var(--slate-50), var(--blue-50), var(--slate-100));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
}

.brand-text {
  display: grid;
  gap: 0;
}

.brand-text strong {
  font-size: 22px;
  line-height: 1.1;
  color: var(--slate-800);
}

.brand-text small {
  font-size: 12px;
  color: var(--slate-500);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  font-weight: 700;
  color: var(--slate-700);
}

.site-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 99px;
  background: var(--blue-600);
  opacity: 0;
  transform: scaleX(0.5);
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--blue-600);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  padding: 9px 16px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(1120px, calc(100% - 40px));
  transform: translateX(-50%);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue-100);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 800;
}

.eyebrow.dark {
  color: var(--blue-600);
}

.hero-content h1,
.hero-content h2 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 760px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 21px);
}

.hero-tags,
.info-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.hero-tags span,
.info-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 12px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.info-tags span,
.detail-tags span {
  color: var(--blue-700);
  background: var(--blue-50);
  border-color: var(--blue-100);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

.btn.primary {
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.btn.primary:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn.ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

.btn.ghost.light {
  color: var(--white);
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 34px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

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

.hero-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  font-size: 26px;
  line-height: 1;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 30px;
  background: var(--white);
}

main,
.page-shell,
.detail-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

main {
  padding-bottom: 70px;
}


.home-main {
  width: 100%;
  max-width: none;
}

.home-main > .page-section,
.home-main > .panel {
  width: min(1220px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.detail-info .btn.ghost,
.panel .btn.ghost {
  color: var(--blue-700);
  background: var(--blue-50);
  border-color: var(--blue-100);
}

.detail-info .btn.ghost:hover,
.panel .btn.ghost:hover {
  background: var(--blue-100);
}

.page-section,
.panel,
.category-overview,
.ranking-page {
  margin-top: 58px;
}

.panel,
.category-overview,
.ranking-page {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--soft-shadow);
}

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

.section-head h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-head p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--slate-500);
}

.section-head a {
  color: var(--blue-600);
  font-weight: 800;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.home-search-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
}

.movie-card {
  display: grid;
  overflow: hidden;
  color: var(--slate-800);
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--slate-900);
}

.compact-card .poster-wrap,
.wide-grid .poster-wrap,
.home-search-grid .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 55%);
  opacity: 0.9;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.8);
  color: var(--white);
  background: rgba(37, 99, 235, 0.86);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.78);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.duration {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.card-body strong {
  font-size: 16px;
  line-height: 1.35;
  color: var(--slate-800);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  color: var(--slate-500);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
}

.card-meta em {
  font-style: normal;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--slate-100);
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

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

.scroll-row .movie-card {
  width: 260px;
  flex: 0 0 auto;
}

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

.category-tile {
  display: grid;
  gap: 12px;
  min-height: 180px;
  border-radius: 20px;
  padding: 22px;
  background: linear-gradient(135deg, var(--blue-50), var(--white));
  border: 1px solid var(--blue-100);
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  color: var(--slate-800);
  font-size: 22px;
}

.category-tile span {
  color: var(--slate-500);
}

.category-tile small {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tile small a {
  color: var(--blue-700);
  background: var(--white);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 46px 88px 1fr auto;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  padding: 10px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  box-shadow: var(--soft-shadow);
}

.ranking-number {
  color: var(--blue-600);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 88px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-info {
  display: grid;
  gap: 2px;
}

.ranking-info strong {
  color: var(--slate-800);
}

.ranking-info em,
.ranking-views {
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

.ranking-views {
  font-weight: 800;
}

.sub-hero {
  margin-top: 34px;
  padding: clamp(38px, 7vw, 72px);
  border-radius: 28px;
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.86), transparent 32%), linear-gradient(135deg, #0f172a, #1e3a8a 55%, #2563eb);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sub-hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.sub-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 220px));
  gap: 14px;
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: var(--white);
  color: var(--slate-800);
  outline: none;
  padding: 10px 18px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 28px 0 18px;
  color: var(--slate-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue-600);
  font-weight: 700;
}

.breadcrumb em {
  font-style: normal;
  color: var(--slate-700);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: clamp(24px, 5vw, 46px);
  align-items: center;
  padding: clamp(24px, 5vw, 42px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 0 0 16px;
  color: var(--slate-800);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
}

.lead {
  max-width: 820px;
  color: var(--slate-500);
  font-size: 18px;
}

.player-section h2,
.story-section h2 {
  margin: 0 0 18px;
  color: var(--slate-800);
  font-size: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video,
.player-cover,
.player-cover img,
.cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #000000;
}

.player-cover {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #000000;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-cover img {
  object-fit: cover;
}

.cover-shade {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28));
}

.big-play {
  position: relative;
  z-index: 3;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--blue-600);
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
}

.story-section p {
  color: var(--slate-700);
  font-size: 17px;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  margin-top: 70px;
  padding: 48px 20px 24px;
}

.footer-inner {
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}

.footer-brand {
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 640px;
  margin: 10px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #dbeafe;
}

.copyright {
  width: min(1220px, 100%);
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
  font-size: 14px;
}

[hidden],
.is-filtered-out {
  display: none !important;
}

@media (max-width: 1080px) {
  .poster-grid,
  .category-results {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

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

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0 2px;
  }

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

  .site-nav a {
    white-space: nowrap;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--slate-100);
  }

  .site-nav a::after {
    display: none;
  }

  .hero-carousel {
    height: 640px;
    min-height: 640px;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero-controls {
    right: 16px;
    bottom: 18px;
  }

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

  .poster-grid,
  .category-results,
  .wide-grid,
  .mini-grid,
  .category-grid,
  .home-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .ranking-row {
    grid-template-columns: 38px 70px 1fr;
  }

  .ranking-views {
    display: none;
  }
}

@media (max-width: 560px) {
  main,
  .page-shell,
  .detail-shell {
    width: min(100% - 24px, 1220px);
  }

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

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    min-height: 620px;
  }

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

  .panel,
  .category-overview,
  .ranking-page,
  .detail-hero {
    padding: 20px;
    border-radius: 20px;
  }

  .poster-grid,
  .category-results,
  .wide-grid,
  .mini-grid,
  .category-grid,
  .home-search-grid {
    grid-template-columns: 1fr;
  }

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

  .scroll-row .movie-card {
    width: 230px;
  }

  .sub-hero {
    border-radius: 20px;
  }

  .big-play {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }
}
