:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --orange-500: #f97316;
  --blue-500: #3b82f6;
  --green-500: #22c55e;
  --purple-500: #a855f7;
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 22px 45px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  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 12px 28px rgba(2, 6, 23, 0.25);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.32);
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(90deg, var(--amber-400), var(--orange-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-400);
}

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

.header-search input,
.wide-search input,
.filter-bar input {
  width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--gray-900);
  outline: none;
  background: rgba(255, 255, 255, 0.94);
}

.header-search button,
.wide-search button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  color: var(--slate-950);
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 130;
  display: none;
  width: min(420px, 92vw);
  max-height: 440px;
  overflow: auto;
  color: var(--gray-900);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.search-panel.open {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.search-result img {
  width: 58px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.search-result strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gray-900);
}

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

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

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

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--slate-800);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 4px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 30%, rgba(245, 158, 11, 0.26), transparent 30%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.14) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 72px;
  transform: translateX(-50%);
  color: var(--white);
}

.hero-kicker,
.eyebrow,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 18px 0 14px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 740px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.7;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

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

.btn.soft {
  color: var(--amber-400);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

.hero-dots button.active {
  width: 36px;
  background: var(--amber-500);
}

.section {
  padding: 58px 0;
}

.search-section {
  margin-top: -34px;
  position: relative;
  z-index: 10;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  border-radius: 28px;
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.search-box h2,
.section-head h2,
.page-hero h1,
.detail-card h1,
.detail-card h2,
.side-card h2 {
  margin: 0;
  color: var(--gray-900);
}

.search-box p,
.section-head p,
.page-hero p,
.category-overview-card p,
.detail-card p,
.site-footer p {
  color: var(--gray-600);
  line-height: 1.75;
}

.wide-search input {
  width: 100%;
  border-color: var(--gray-200);
  background: var(--gray-50);
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-head p {
  margin: 8px 0 0;
}

.section-head.compact h2 {
  font-size: 26px;
}

.section-link,
.text-link {
  color: var(--amber-600);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--slate-900);
}

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

.movie-card:hover .poster img,
.ranking-row:hover img,
.category-cover-set:hover img {
  transform: scale(1.08);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.68));
}

.play-icon {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 44px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-icon {
  opacity: 1;
  transform: scale(1);
}

.poster-label,
.duration,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.poster-label {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: var(--amber-500);
}

.duration {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.74);
}

.rank-badge {
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  margin-bottom: 10px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--amber-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--gray-600);
  font-size: 12px;
  background: var(--gray-100);
}

.horizontal-card {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.horizontal-card .poster {
  height: 100%;
  min-height: 132px;
  aspect-ratio: auto;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 36px;
}

.stack-list,
.side-list,
.ranking-card-list {
  display: grid;
  gap: 18px;
}

.ranking-box,
.side-card,
.detail-card,
.category-overview-card,
.filter-bar {
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.ranking-box,
.side-card,
.detail-card {
  padding: 26px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 34px 68px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--gray-50);
}

.ranking-row img {
  width: 68px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.26s ease;
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  background: var(--slate-800);
}

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

.ranking-meta {
  color: var(--gray-500);
  font-size: 12px;
}

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

.category-tile {
  display: grid;
  min-height: 170px;
  align-content: end;
  border-radius: 24px;
  padding: 24px;
  color: var(--white);
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.42), transparent 34%),
    linear-gradient(135deg, var(--slate-900), var(--slate-800));
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.page-hero {
  padding: 70px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.22), transparent 28%),
    linear-gradient(90deg, var(--slate-950), var(--slate-800));
}

.page-hero h1 {
  margin: 18px 0 12px;
  color: var(--white);
  font-size: clamp(38px, 6vw, 62px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
}

.category-overview-card {
  overflow: hidden;
}

.category-cover-set {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--slate-900);
}

.category-cover-set img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.category-overview-card > div {
  padding: 22px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
}

.filter-bar {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
}

.filter-bar input {
  width: 100%;
  border-color: var(--gray-200);
  background: var(--gray-50);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--gray-700);
  font-weight: 800;
  cursor: pointer;
  background: var(--gray-100);
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: var(--white);
  background: var(--amber-500);
}

.player-section {
  padding: 24px 0 42px;
  background: #000;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

.player-glow {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.28);
  filter: blur(22px);
}

.big-play {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  color: var(--slate-950);
  font-size: 42px;
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.36);
}

.player-shell.is-playing .player-cover {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 32px;
  padding: 48px 0 70px;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.detail-card h1 {
  margin-top: 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.detail-card h2,
.side-card h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  color: var(--gray-600);
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--gray-100);
}

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

.detail-card p {
  margin: 0;
  font-size: 16px;
  text-align: justify;
}

.gradient-card {
  background: linear-gradient(135deg, #fff7ed, #ffffff 54%, #eff6ff);
}

.detail-side .horizontal-card,
.ranking-card-list .horizontal-card {
  grid-template-columns: 150px 1fr;
}

.detail-side .card-body p,
.ranking-card-list .card-body p {
  -webkit-line-clamp: 1;
  min-height: 22px;
}

.sticky-card {
  position: sticky;
  top: 92px;
}

.site-footer {
  color: var(--gray-300);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 50px 0;
}

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

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

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  color: var(--gray-500);
  text-align: center;
}

.hidden-card {
  display: none !important;
}

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

  .mobile-toggle {
    display: inline-block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

  .sticky-card {
    position: static;
  }

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .nav-shell {
    min-height: 62px;
    gap: 12px;
  }

  .brand-name {
    font-size: 17px;
  }

  .header-search {
    display: none;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    bottom: 74px;
  }

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

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

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .hero-arrow.prev {
    left: 12px;
  }

  .hero-arrow.next {
    right: 12px;
  }

  .search-box {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .section {
    padding: 40px 0;
  }

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

  .movie-grid.five-col,
  .movie-grid.four-col,
  .movie-grid.two-col,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .horizontal-card,
  .detail-side .horizontal-card,
  .ranking-card-list .horizontal-card {
    grid-template-columns: 120px 1fr;
  }

  .card-body {
    padding: 14px;
  }

  .card-title {
    font-size: 16px;
  }

  .ranking-row {
    grid-template-columns: 30px 58px 1fr;
  }

  .ranking-meta {
    display: none;
  }

  .page-hero {
    padding: 48px 0;
  }

  .detail-card,
  .side-card,
  .ranking-box {
    padding: 20px;
  }

  .detail-layout {
    padding: 34px 0 50px;
  }

  .player-shell {
    border-radius: 16px;
  }

  .big-play {
    width: 72px;
    height: 72px;
    font-size: 34px;
  }

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

@media (max-width: 480px) {
  .movie-grid.five-col,
  .movie-grid.four-col,
  .movie-grid.two-col,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-card,
  .detail-side .horizontal-card,
  .ranking-card-list .horizontal-card {
    grid-template-columns: 1fr;
  }

  .horizontal-card .poster {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }
}
