:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --gray-50: #f8fafc;
  --gray-100: #f3f4f6;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --amber-400: #fbbf24;
  --orange-500: #f97316;
  --red-500: #ef4444;
  --blue-500: #3b82f6;
  --cyan-500: #06b6d4;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.16);
  --shadow-lg: 0 25px 70px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.top-nav {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  color: white;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.35);
}

.brand-text,
.footer-brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
}

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

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

.nav-search {
  position: relative;
  width: 278px;
  flex-shrink: 0;
}

.nav-search input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 10px 74px 10px 16px;
  color: white;
  background: var(--slate-700);
  outline: none;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input::placeholder {
  color: #cbd5e1;
}

.nav-search input:focus {
  background: #475569;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.28);
}

.nav-search button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  color: white;
  background: var(--teal-500);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  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::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(20, 184, 166, 0.25), transparent 24%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.46) 46%, rgba(0, 0, 0, 0.2));
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: 32px;
  bottom: 92px;
  z-index: 2;
  max-width: 760px;
  color: white;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.movie-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  color: white;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(12px);
}

.hero-meta span:first-child {
  background: var(--teal-500);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.btn-primary {
  padding: 13px 28px;
  color: white;
  background: var(--teal-500);
  box-shadow: 0 18px 38px rgba(20, 184, 166, 0.32);
}

.btn-primary:hover,
.btn-small:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--teal-600);
}

.btn-secondary {
  padding: 13px 24px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.52);
  cursor: pointer;
  font-size: 30px;
  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;
  transform: translateY(-50%);
}

.hero-next {
  right: 24px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--teal-500);
}

.page-shell,
.section-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-shell {
  padding: 54px 0;
}

.section-block {
  margin-bottom: 68px;
}

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

.section-heading h2,
.page-heading h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
}

.section-heading p,
.page-heading p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--gray-500);
  line-height: 1.7;
}

.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;
}

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

.movie-grid.grid-small {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

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

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-surface {
  position: relative;
  display: block;
  overflow: hidden;
  height: 210px;
  background:
    radial-gradient(circle at 25% 20%, rgba(20, 184, 166, 0.32), transparent 26%),
    linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.card-large .poster-surface {
  height: 300px;
}

.movie-grid.grid-small .poster-surface {
  height: 170px;
}

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

.poster-surface img.image-hidden {
  opacity: 0;
}

.card-link:hover img {
  transform: scale(1.1);
}

.duration-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: white;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.68);
}

.poster-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 72px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  color: white;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent);
  transition: opacity 0.25s ease;
}

.card-link:hover .poster-copy {
  opacity: 1;
}

.card-body {
  display: block;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 48px;
  margin-bottom: 10px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.card-meta em {
  max-width: 62%;
  overflow: hidden;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--gray-700);
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--gray-100);
}

.card-meta span {
  color: #b45309;
  font-weight: 700;
}

.card-tags span {
  padding: 4px 8px;
  color: var(--gray-500);
  background: var(--gray-100);
}

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

.category-tile {
  display: block;
  min-height: 138px;
  border-radius: 22px;
  padding: 22px;
  color: white;
  background: linear-gradient(135deg, var(--slate-900), var(--teal-600));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.category-tile span {
  color: #ccfbf1;
  line-height: 1.6;
}

.score-panel {
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 124px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 18px;
  border-radius: 18px;
  padding: 14px;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.rank-index {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

.rank-cover {
  height: 78px;
  border-radius: 12px;
}

.rank-info strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.rank-info small,
.rank-info em {
  display: block;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.5;
  font-style: normal;
}

.rank-info em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  color: #b45309;
  font-weight: 800;
  text-align: right;
}

.banner-head {
  color: white;
  background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
}

.banner-head.orange {
  background: linear-gradient(90deg, var(--orange-500), var(--red-500));
}

.banner-head.blue {
  background: linear-gradient(90deg, var(--blue-500), var(--cyan-500));
}

.banner-head.teal {
  background: linear-gradient(90deg, var(--teal-600), #0f766e);
}

.banner-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.banner-inner h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.04em;
}

.banner-inner p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.75;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow-lg);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.24), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  background: rgba(20, 184, 166, 0.92);
  box-shadow: 0 18px 44px rgba(20, 184, 166, 0.38);
}

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

.detail-title {
  margin: 26px 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin-bottom: 22px;
  color: var(--gray-500);
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.content-box {
  margin-bottom: 20px;
  border-radius: 20px;
  padding: 24px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.content-box h2,
.side-box h2 {
  margin: 0 0 14px;
  font-size: 23px;
}

.content-box p {
  margin: 0 0 12px;
  color: var(--gray-700);
  line-height: 1.9;
}

.side-box {
  position: sticky;
  top: 88px;
  border-radius: 22px;
  padding: 22px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.side-poster {
  height: 420px;
  border-radius: 18px;
  margin-bottom: 18px;
}

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

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 10px;
  color: var(--gray-500);
}

.info-list strong {
  color: var(--gray-900);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.search-panel {
  max-width: 860px;
  margin: 0 auto 36px;
  display: flex;
  gap: 12px;
}

.search-panel input {
  flex: 1;
  border: 0;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 16px;
  background: white;
  box-shadow: var(--shadow-sm);
  outline: none;
}

.search-panel input:focus {
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22), var(--shadow-sm);
}

.search-panel button,
.btn-small {
  border: 0;
  padding: 0 22px;
  color: white;
  background: var(--teal-500);
  cursor: pointer;
}

.empty-state {
  border-radius: 22px;
  padding: 54px;
  text-align: center;
  color: var(--gray-500);
  background: white;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1100px) {
  .nav-search {
    width: 230px;
  }

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

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

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

  .side-box {
    position: static;
  }
}

@media (max-width: 860px) {
  .top-nav {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 11px 0;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-search {
    margin-bottom: 8px;
  }

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

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

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

  .rank-cover {
    height: 64px;
  }
}

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

  .movie-grid,
  .movie-grid.grid-three,
  .movie-grid.grid-small,
  .category-strip {
    grid-template-columns: 1fr;
  }

  .poster-surface,
  .movie-grid.grid-small .poster-surface {
    height: 230px;
  }

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

  .hero-meta {
    gap: 8px;
  }

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

  .rank-cover {
    display: none;
  }

  .rank-score {
    grid-column: 2;
  }

  .search-panel {
    flex-direction: column;
  }

  .search-panel button {
    padding: 14px 22px;
  }
}
