:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --blue-900: #1e3a8a;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --cyan-400: #22d3ee;
  --emerald-500: #10b981;
  --orange-500: #f97316;
  --rose-500: #f43f5e;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --shadow-card: 0 18px 48px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-50);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  background: linear-gradient(135deg, #0f172a, #1e3a8a 45%, #06b6d4);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #fff;
  background: linear-gradient(90deg, var(--slate-900), var(--blue-900), var(--slate-900));
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.22);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan-400));
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}

.brand-mark span {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
  margin-left: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
}

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
}

.site-search {
  width: min(310px, 28vw);
  position: relative;
  display: flex;
  align-items: center;
}

.site-search input,
.mobile-search input,
.search-hero input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 11px 76px 11px 18px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-search input:focus,
.mobile-search input:focus,
.search-hero input:focus {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

.site-search button,
.mobile-search button,
.search-hero button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--blue-500);
  padding: 7px 16px;
  font-weight: 700;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 4px;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.mobile-search {
  position: relative;
  margin-top: 16px;
}

.hero {
  position: relative;
  height: 600px;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--blue-900), #164e63);
}

.hero-slide {
  position: absolute;
  inset: 0;
  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);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 150px;
  background: linear-gradient(0deg, var(--gray-50), rgba(248, 250, 252, 0));
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(660px, 100%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.32);
  color: #bfdbfe;
  font-weight: 700;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h1 span,
.hero h2 span {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #60a5fa, var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy p {
  max-width: 650px;
  font-size: 20px;
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.94);
  margin: 0 0 28px;
}

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

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

.btn-primary {
  color: #fff;
  background: var(--blue-500);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

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

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: var(--blue-900);
  background: #fff;
}

.hero-tabs {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  width: min(1232px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.hero-tab {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(15, 23, 42, 0.54);
  border-radius: 18px;
  padding: 12px 14px;
  text-align: left;
  backdrop-filter: blur(16px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-tab strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-tab span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 12px;
}

.hero-tab.is-active,
.hero-tab:hover {
  background: rgba(37, 99, 235, 0.62);
  transform: translateY(-2px);
}

.main-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.band-section {
  padding: 72px 0;
  background: linear-gradient(90deg, #ecfdf5, #ecfeff);
}

.band-section .main-section {
  padding-top: 0;
  padding-bottom: 0;
}

.rank-band {
  background: linear-gradient(90deg, #fff7ed, #fff1f2);
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  color: var(--gray-900);
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--gray-500);
  max-width: 680px;
  line-height: 1.75;
}

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

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card a {
  display: block;
  height: 100%;
  color: inherit;
}

.poster-box {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--blue-900), #0e7490);
}

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

.movie-card:hover img,
.feature-card:hover img,
.hot-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.05) 55%);
}

.poster-meta,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.poster-meta {
  left: 12px;
  top: 12px;
  background: rgba(16, 185, 129, 0.92);
}

.poster-year {
  right: 12px;
  bottom: 12px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-500), var(--rose-500));
  box-shadow: 0 14px 30px rgba(244, 63, 94, 0.28);
}

.movie-card .rank-badge + img + .poster-mask + .poster-meta {
  top: 60px;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.8);
  border-radius: 50%;
  color: var(--blue-900);
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-copy {
  display: block;
  padding: 18px;
}

.genre-line {
  display: block;
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-copy h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-copy p {
  color: var(--gray-500);
  margin: 0 0 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span,
.detail-tags span,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue-900);
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.feature-card {
  display: grid;
  grid-template-columns: 44% 1fr;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.feature-card .poster-box {
  aspect-ratio: auto;
  min-height: 260px;
}

.feature-copy {
  padding: 26px;
}

.feature-copy h3 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 900;
}

.feature-copy p {
  color: var(--gray-500);
  line-height: 1.76;
  margin: 0 0 20px;
}

.hot-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 4px 28px;
  scrollbar-width: thin;
}

.hot-card {
  flex: 0 0 322px;
}

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

.category-card {
  display: block;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  font-size: 22px;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.category-card span {
  color: var(--gray-500);
  line-height: 1.65;
}

.page-hero,
.detail-hero,
.search-hero {
  color: #fff;
  background: linear-gradient(90deg, var(--blue-600), #0891b2, var(--blue-900));
  padding: 72px 24px;
}

.page-hero-inner,
.detail-hero-inner,
.search-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1,
.detail-title h1,
.search-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p,
.detail-title p,
.search-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.78;
  margin: 0;
}

.filter-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination {
  max-width: 1280px;
  margin: 38px auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pagination a {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--gray-700);
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.pagination a.is-current,
.pagination a:hover {
  color: #fff;
  background: var(--blue-600);
}

.player-area {
  background: #000;
}

.player-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.player-shell {
  position: relative;
  background: #000;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  transition: opacity 0.25s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.big-play {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--blue-900);
  background: rgba(255, 255, 255, 0.92);
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
}

.detail-card,
.side-card {
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.detail-card {
  padding: 34px;
}

.detail-title {
  background: linear-gradient(135deg, var(--slate-900), var(--blue-900));
  color: #fff;
  padding: 34px;
  border-radius: 26px;
  margin-bottom: 28px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 14px;
  font-size: 26px;
  font-weight: 900;
}

.detail-card h2:first-child,
.side-card h2:first-child {
  margin-top: 0;
}

.detail-card p {
  color: var(--gray-700);
  line-height: 1.9;
  margin: 0 0 18px;
  font-size: 17px;
}

.side-card {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 88px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-card {
  display: grid;
  grid-template-columns: 106px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  color: inherit;
  background: var(--gray-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
  background: #e0f2fe;
  transform: translateX(3px);
}

.related-card img {
  width: 106px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.related-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.related-card span {
  color: var(--gray-500);
  font-size: 12px;
}

.search-hero form {
  position: relative;
  max-width: 760px;
  margin-top: 26px;
}

.search-hero input {
  background: #fff;
  color: var(--gray-900);
  border-color: transparent;
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 18px;
}

.search-hero button {
  padding: 10px 22px;
}

.empty-state {
  display: none;
  padding: 56px 20px;
  text-align: center;
  color: var(--gray-500);
  border-radius: 24px;
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

.cta-band {
  color: #fff;
  background: linear-gradient(90deg, var(--slate-900), var(--blue-900), var(--slate-900));
  text-align: center;
  padding: 70px 24px;
}

.cta-band h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

.cta-band p {
  max-width: 720px;
  margin: 0 auto 26px;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.8;
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-950);
  padding: 46px 24px 24px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-inner p {
  max-width: 540px;
  line-height: 1.8;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-content: start;
  justify-content: flex-end;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 1100px) {
  .site-search {
    display: none;
  }

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero {
    height: 720px;
  }

  .hero-inner {
    align-items: flex-start;
    padding-top: 76px;
  }

  .hero-tabs {
    grid-template-columns: 1fr;
    bottom: 24px;
  }

  .hero-tab:nth-child(n+4) {
    display: none;
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero {
    height: 760px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .main-section {
    padding: 50px 16px;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-block;
    margin-top: 12px;
  }

  .movie-grid,
  .movie-grid.three,
  .movie-grid.two,
  .category-cloud,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hot-card {
    flex-basis: 86vw;
  }

  .page-hero,
  .detail-hero,
  .search-hero {
    padding: 54px 16px;
  }

  .detail-wrap {
    padding: 28px 16px 56px;
  }

  .detail-card,
  .detail-title {
    padding: 24px;
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 22px;
  }
}
