:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-800: #1f2937;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --blue-500: #3b82f6;
  --green-500: #22c55e;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.34);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand:hover .brand-mark {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 18px 35px rgba(249, 115, 22, 0.46);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.brand-subtitle {
  font-size: 12px;
  color: #cbd5e1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 18px;
  border-radius: 12px;
  color: #e2e8f0;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: var(--orange-500);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.28), transparent 32%), linear-gradient(135deg, #111827 0%, #1e293b 46%, #431407 100%);
}

.hero::before,
.hero::after,
.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  filter: blur(75px);
  opacity: 0.18;
  pointer-events: none;
}

.hero::before,
.page-hero::before,
.detail-hero::before {
  top: 70px;
  left: 8%;
  background: var(--orange-500);
}

.hero::after {
  right: 8%;
  bottom: 30px;
  background: var(--blue-500);
}

.hero-shell {
  position: relative;
  z-index: 1;
  min-height: 640px;
  padding: 54px 0 64px;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  min-height: 520px;
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.66fr);
  gap: 42px;
  padding: 54px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 34px;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.48)), var(--hero-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.32);
  overflow: hidden;
}

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

.hero-kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.25);
  font-weight: 800;
  font-size: 14px;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(38px, 5.5vw, 68px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 16px;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 25px);
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 16px;
}

.hero-actions,
.detail-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--orange-500), var(--orange-600));
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.28);
}

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

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

.btn-ghost {
  color: var(--orange-600);
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 620px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-search input,
.search-box input,
.filter-box input,
.filter-box select {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--gray-800);
  background: #fff;
  outline: none;
}

.hero-search button,
.search-box button {
  border: 0;
  color: #fff;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange-500), var(--orange-600));
}

.hero-poster {
  position: relative;
  align-self: stretch;
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 65px rgba(2, 6, 23, 0.48);
}

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

.hero-poster-info {
  position: absolute;
  inset: auto 18px 18px 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-poster-info strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.hero-poster-info span {
  color: #cbd5e1;
  font-size: 14px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

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

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

.section {
  padding: 72px 0;
}

.section-muted {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
}

.section-dark {
  color: #fff;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

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

.section-title h2,
.page-title h1 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(28px, 3.5vw, 46px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-dark .section-title h2,
.page-hero h1,
.detail-hero h1 {
  color: #fff;
}

.section-title p,
.page-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--gray-500);
}

.section-dark .section-title p,
.page-hero p,
.detail-hero p {
  color: #cbd5e1;
}

.feature-grid,
.category-grid,
.movie-grid,
.related-grid {
  display: grid;
  gap: 24px;
}

.feature-grid {
  grid-template-columns: repeat(4, 1fr);
}

.feature-card,
.category-card,
.info-panel,
.content-card {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.75);
}

.feature-card {
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.18);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
}

.feature-card h3,
.category-card h3,
.content-card h2,
.content-card h3 {
  margin: 0 0 9px;
  color: var(--gray-800);
  font-size: 20px;
  font-weight: 900;
}

.feature-card p,
.category-card p,
.content-card p {
  margin: 0;
  color: var(--gray-500);
}

.category-grid {
  grid-template-columns: repeat(4, 1fr);
}

.category-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
}

.category-card span {
  display: inline-flex;
  margin-top: 16px;
  color: var(--orange-600);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #431407);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease, filter 0.42s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.play-chip,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.28);
}

.rank-badge {
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 9px;
  background: linear-gradient(135deg, #fbbf24, var(--orange-600));
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 28px;
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 900;
}

.movie-title:hover {
  color: var(--orange-600);
}

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

.movie-meta span {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gray-100);
}

.movie-info p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--gray-500);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-chip,
.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.tag-row span {
  color: #c2410c;
  background: #fff7ed;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 46px 58px 1fr 24px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.25s ease, transform 0.25s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.14);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
}

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

.ranking-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ranking-text strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-text em {
  overflow: hidden;
  color: #cbd5e1;
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-arrow {
  color: #fed7aa;
  font-size: 26px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #111827 0%, #1e293b 52%, #431407 100%);
}

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

.page-title {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.filter-panel,
.search-panel {
  margin: -30px auto 46px;
  position: relative;
  z-index: 2;
}

.filter-box,
.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.88);
}

.filter-box {
  grid-template-columns: 1fr 210px;
}

.filter-box select {
  border: 1px solid var(--gray-200);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.breadcrumbs a,
.breadcrumbs span {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
}

.detail-hero {
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.62)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 38px;
  align-items: center;
  padding: 58px 0;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
}

.detail-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  font-size: 19px;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}

.detail-chip {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.content-card {
  padding: 26px;
  margin-bottom: 24px;
}

.content-card h2 {
  font-size: 26px;
}

.content-card p {
  margin: 10px 0 0;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.9;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 26px 65px rgba(2, 6, 23, 0.22);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  z-index: 2;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--orange-500), var(--orange-600));
  box-shadow: 0 18px 35px rgba(249, 115, 22, 0.35);
}

.player-button span:first-child {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--orange-600);
  background: #fff;
}

.aside-card {
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.82);
  margin-bottom: 24px;
}

.aside-card h3 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 900;
}

.aside-links {
  display: grid;
  gap: 10px;
}

.aside-links a {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
  transition: color 0.25s ease, background 0.25s ease;
}

.aside-links a:hover {
  color: #fff;
  background: var(--orange-500);
}

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

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  min-height: 220px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  border-radius: 22px;
  color: var(--gray-500);
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800), var(--slate-900));
}

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

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 15px;
  color: #fff;
}

.footer-grid h3 {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange-500);
}

.footer-grid p,
.footer-grid a {
  display: block;
  margin: 0 0 9px;
  color: #cbd5e1;
  font-size: 14px;
}

.footer-grid a:hover {
  color: var(--orange-400);
}

.footer-bottom {
  padding: 20px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 1024px) {
  .feature-grid,
  .category-grid,
  .movie-grid,
  .search-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-poster {
    max-width: 420px;
  }

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

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

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

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

  .nav {
    min-height: 66px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: var(--slate-800);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.32);
  }

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

  .nav-link {
    width: 100%;
  }

  .hero-shell {
    min-height: auto;
    padding: 28px 0 42px;
  }

  .hero-slide {
    padding: 26px;
    border-radius: 24px;
  }

  .hero-search,
  .filter-box,
  .search-box {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 320px;
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: grid;
  }

  .feature-grid,
  .category-grid,
  .movie-grid,
  .search-results,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .detail-hero-grid {
    padding: 34px 0;
  }

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

  .content-card,
  .aside-card {
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 38px 0;
  }
}

@media (max-width: 520px) {
  .feature-grid,
  .category-grid,
  .movie-grid,
  .search-results,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 112px 1fr;
  }

  .movie-cover {
    height: 100%;
    aspect-ratio: auto;
  }

  .movie-title {
    -webkit-line-clamp: 2;
  }

  .hero h1,
  .detail-hero h1 {
    letter-spacing: -0.025em;
  }
}
