:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-950: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --amber-500: #f59e0b;
  --orange-500: #f97316;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-950);
  background: #f8fafc;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-900);
  background: var(--teal-400);
  font-size: 14px;
  box-shadow: 0 0 0 6px rgba(45, 212, 191, 0.14);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: #e2e8f0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--teal-400);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.big-search input {
  width: 240px;
  color: var(--white);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 110px 10px 16px;
  background: var(--slate-700);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.big-search input:focus {
  border-color: var(--teal-400);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.18);
}

.nav-search button,
.big-search button {
  position: absolute;
  right: 4px;
  border: 0;
  border-radius: 999px;
  padding: 7px 15px;
  color: var(--white);
  background: var(--teal-600);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.big-search button:hover {
  background: var(--teal-500);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  color: var(--white);
  background: #000;
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.5) 48%, rgba(0, 0, 0, 0.16));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 90px;
  max-width: 760px;
}

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

.hero-tags span,
.tag-list span,
.detail-meta span,
.detail-meta strong {
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.hero-tags span:first-child {
  background: var(--teal-600);
}

.hero-content h1 {
  margin: 18px 0 16px;
  max-width: 900px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.54);
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

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

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

.primary-btn {
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.3);
}

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

.primary-btn:hover {
  background: var(--teal-500);
  box-shadow: 0 18px 34px rgba(20, 184, 166, 0.32);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  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: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  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: var(--teal-400);
}

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

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

.category-tile {
  border-radius: 22px;
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
  display: block;
  font-size: 22px;
}

.category-tile span {
  color: #cbd5e1;
}

.content-section {
  margin-top: 64px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

.poster-wrap {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: var(--slate-800);
}

.movie-card-small .poster-wrap {
  height: 210px;
}

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

.movie-link:hover .poster-wrap img {
  transform: scale(1.1);
}

.duration,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--white);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.duration {
  right: 10px;
}

.rank-badge {
  left: 10px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.poster-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 14px;
  color: var(--white);
  opacity: 0;
  transform: translateY(12px);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-link:hover .poster-mask {
  opacity: 1;
  transform: translateY(0);
}

.poster-mask p {
  margin: 0;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-card-body h3 {
  min-height: 48px;
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-link:hover h3 {
  color: var(--teal-600);
}

.movie-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--gray-600);
  font-size: 14px;
}

.movie-meta-row span {
  overflow: hidden;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--gray-100);
}

.movie-meta-row strong {
  color: var(--amber-500);
}

.ranking-section {
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 48px 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-radius: 16px;
  padding: 12px;
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row-large {
  grid-template-columns: 56px 140px minmax(0, 1fr) auto auto;
}

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

.ranking-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.ranking-row img {
  width: 100%;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-title {
  min-width: 0;
  font-weight: 800;
}

.ranking-title small {
  display: block;
  overflow: hidden;
  color: var(--gray-600);
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-meta {
  color: var(--gray-600);
  white-space: nowrap;
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.35), transparent 36%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.compact-hero {
  padding: 76px 24px;
}

.compact-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

.compact-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  letter-spacing: -0.06em;
}

.compact-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.breadcrumb {
  color: #cbd5e1;
}

.breadcrumb a {
  color: var(--teal-400);
}

.category-overview-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  background: var(--slate-800);
}

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

.category-overview-body {
  padding: 22px;
}

.category-overview-body h2 {
  margin: 0;
  font-size: 24px;
}

.category-overview-body p {
  color: var(--gray-600);
}

.category-overview-body span {
  color: var(--teal-600);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: #000;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.06);
  opacity: 0.62;
}

.detail-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 24px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

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

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

.detail-info h1 {
  margin: 12px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  color: #e5e7eb;
  font-size: 20px;
}

.detail-meta {
  margin: 24px 0;
}

.tag-list {
  margin-bottom: 30px;
}

.tag-list span {
  background: rgba(255, 255, 255, 0.16);
}

.detail-container {
  padding-top: 36px;
}

.player-card,
.detail-text-card {
  overflow: hidden;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 6px;
  color: var(--slate-900);
  background: var(--teal-400);
  font-size: 36px;
  box-shadow: 0 0 0 14px rgba(45, 212, 191, 0.18);
}

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

.detail-text-card {
  margin-top: 28px;
  padding: 30px;
}

.detail-text-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-text-card p {
  margin: 0 0 26px;
  color: var(--gray-700);
  font-size: 17px;
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
}

.info-list dt {
  color: var(--gray-600);
}

.info-list dd {
  margin: 0;
  font-weight: 700;
}

.info-list a {
  color: var(--teal-600);
}

.search-panel {
  border-radius: 28px;
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.big-search {
  position: relative;
}

.big-search input {
  width: 100%;
  color: var(--gray-950);
  background: #eef2f7;
}

.search-summary {
  margin: 16px 0 0;
  color: var(--gray-600);
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  color: var(--white);
}

.footer-brand p {
  max-width: 520px;
  color: #94a3b8;
}

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

.footer-links h3 {
  margin: 0 0 8px;
  color: var(--white);
}

.footer-links a:hover {
  color: var(--teal-400);
}

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 24px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 1100px) {
  .nav-menu {
    gap: 12px;
  }

  .nav-search input {
    width: 200px;
  }

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

@media (max-width: 860px) {
  .nav-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu,
  .nav-search {
    display: none;
    width: 100%;
  }

  .nav-menu.is-open,
  .nav-search.is-open {
    display: grid;
  }

  .nav-menu.is-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: 12px;
  }

  .nav-search.is-open input {
    width: 100%;
  }

  .hero-carousel {
    height: 76vh;
    min-height: 540px;
  }

  .hero-content {
    left: 20px;
    bottom: 84px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .ranking-row,
  .ranking-row-large {
    grid-template-columns: 44px 88px minmax(0, 1fr) auto;
  }

  .ranking-meta {
    display: none;
  }

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

@media (max-width: 560px) {
  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    font-size: 11px;
  }

  .page-container {
    padding: 34px 16px;
  }

  .movie-grid,
  .all-grid,
  .category-strip,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card-small .poster-wrap {
    height: 260px;
  }

  .section-head {
    display: block;
  }

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

  .ranking-section {
    padding: 16px;
  }

  .ranking-row,
  .ranking-row-large {
    grid-template-columns: 38px 72px minmax(0, 1fr);
  }

  .ranking-row strong {
    grid-column: 3;
  }

  .detail-info h1,
  .compact-hero h1 {
    letter-spacing: -0.04em;
  }

  .detail-text-card {
    padding: 22px;
  }
}
