:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --teal-100: #ccfbf1;
  --blue-100: #dbeafe;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: white;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.2);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-500), #14b8a6);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35);
}

.brand strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: #e2e8f0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--emerald-400);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
}

.hero-section {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--slate-900);
  box-shadow: var(--shadow-soft);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
}

.hero-slide.is-active {
  display: block;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 26%, rgba(16, 185, 129, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.15));
}

.hero-content {
  position: absolute;
  left: clamp(26px, 6vw, 74px);
  bottom: clamp(34px, 7vw, 82px);
  width: min(620px, calc(100% - 48px));
  color: white;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--emerald-400);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
}

.hero-content p {
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: 18px;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary,
.btn-small {
  color: white;
  background: linear-gradient(135deg, var(--emerald-600), #0d9488);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.25);
}

.btn-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.hero-dots {
  position: absolute;
  left: clamp(26px, 6vw, 74px);
  bottom: 24px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 32px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--emerald-400);
}

.hero-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  color: white;
  background: linear-gradient(150deg, var(--slate-800), #064e3b);
  box-shadow: var(--shadow-soft);
}

.hero-panel h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.hero-panel p {
  margin: 0 0 18px;
  color: #d1fae5;
}

.hero-search {
  display: flex;
  overflow: hidden;
  margin-bottom: 22px;
  border-radius: 999px;
  background: white;
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 16px;
  outline: 0;
}

.hero-search button {
  border: 0;
  padding: 0 18px;
  color: white;
  background: var(--emerald-600);
  cursor: pointer;
}

.hero-compact-list,
.compact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}

.compact-card img {
  width: 62px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
}

.compact-card span {
  font-weight: 700;
}

.section-wrap,
.overview-list,
.ranking-list,
.sub-hero,
.breadcrumb,
.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 54px auto 0;
}

.section-wrap {
  padding: 0;
}

.section-wrap.no-top {
  margin-top: 28px;
}

.section-wrap.tinted,
.section-wrap.tinted-blue {
  padding: 30px;
  border-radius: var(--radius-lg);
}

.section-wrap.tinted {
  background: linear-gradient(135deg, #ecfdf5, var(--teal-100));
}

.section-wrap.tinted-blue {
  background: linear-gradient(135deg, #eff6ff, var(--blue-100));
}

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

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

.section-heading a {
  color: var(--emerald-700);
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--slate-800);
}

.movie-card-large .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.34);
}

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

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

.movie-card h3 {
  margin: 8px 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.3;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--emerald-700);
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile,
.category-overview-card,
.side-card,
.detail-article {
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-card);
}

.category-tile {
  min-height: 150px;
  padding: 22px;
  background: linear-gradient(135deg, white, #ecfdf5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: var(--slate-900);
  font-size: 22px;
}

.category-tile span {
  color: var(--slate-600);
  font-size: 14px;
}

.sub-hero {
  padding: 50px;
  border-radius: var(--radius-lg);
  color: white;
  background:
    radial-gradient(circle at top right, rgba(52, 211, 153, 0.35), transparent 30%),
    linear-gradient(135deg, var(--slate-900), var(--slate-700), var(--emerald-700));
  box-shadow: var(--shadow-soft);
}

.sub-hero.compact {
  padding: 36px;
}

.sub-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.sub-hero p {
  max-width: 760px;
  margin: 0;
  color: #e2e8f0;
  font-size: 17px;
}

.filter-box {
  display: flex;
  max-width: 620px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: white;
}

.filter-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 20px;
  outline: 0;
}

.filter-box button {
  border: 0;
  padding: 0 24px;
  color: white;
  background: var(--emerald-600);
  cursor: pointer;
}

.search-page-box {
  min-height: 52px;
}

.overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 24px;
}

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

.category-overview-head h2 {
  margin: 0 0 6px;
  color: var(--slate-900);
}

.category-overview-head p {
  margin: 0;
  color: var(--slate-600);
}

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

.category-overview-card .compact-card {
  color: var(--slate-800);
  background: var(--slate-100);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-card);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--emerald-600), #0f766e);
}

.rank-poster img {
  width: 82px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--slate-600);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-600);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: black;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: white;
  background: black;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: blur(2px);
}

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(5, 150, 105, 0.28));
}

.player-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  padding-left: 5px;
  background: var(--emerald-600);
  box-shadow: 0 18px 45px rgba(5, 150, 105, 0.42);
  font-size: 34px;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 16px;
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.82);
}

.player-message.is-visible {
  display: block;
}

.detail-article {
  margin-top: 24px;
  padding: 28px;
}

.detail-article h1 {
  margin: 0 0 12px;
  color: var(--slate-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.detail-article h2 {
  margin: 28px 0 10px;
  color: var(--slate-900);
}

.lead-text {
  color: var(--slate-600);
  font-size: 18px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.detail-cover {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-card {
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 14px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--slate-500);
}

.side-card dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 700;
}

.related-wrap {
  margin-top: 42px;
}

.site-footer {
  margin-top: 76px;
  padding: 44px 0 24px;
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 20px;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
}

.site-footer li {
  list-style: none;
  margin: 7px 0;
}

.site-footer a:hover {
  color: var(--emerald-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  color: #94a3b8;
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1024px) {
  .hero-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: -1;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
  }

  .mobile-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-radius: 18px;
    background: var(--slate-900);
    box-shadow: var(--shadow-soft);
  }

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

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

  .hero-section,
  .section-wrap,
  .overview-list,
  .ranking-list,
  .sub-hero,
  .breadcrumb,
  .detail-layout {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-content {
    left: 22px;
    bottom: 58px;
    width: calc(100% - 44px);
  }

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

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .section-wrap.tinted,
  .section-wrap.tinted-blue,
  .sub-hero,
  .sub-hero.compact {
    padding: 24px;
  }

  .rank-item {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 2 / -1;
  }

  .rank-poster img {
    width: 72px;
    height: 96px;
  }

  .filter-box,
  .hero-search {
    border-radius: 18px;
  }

  .filter-box button,
  .hero-search button {
    padding: 0 16px;
  }
}
