: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;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-400: #fb923c;
  --white: #ffffff;
  --shadow-md: 0 10px 20px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 22px 45px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: var(--white);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 70px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.desktop-nav,
.mobile-nav,
.footer-links,
.category-pills,
.hero-actions,
.detail-meta,
.hero-tags,
.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.desktop-nav a,
.mobile-nav a {
  font-size: 15px;
  color: var(--slate-200);
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--orange-400);
}

.mobile-toggle {
  display: none;
  color: var(--white);
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.55) 48%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 78px;
  width: min(100% - 44px, var(--max-width));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--white);
  background: var(--orange-500);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 12px;
  max-width: 850px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 0 0 20px;
  color: var(--slate-200);
  font-size: clamp(16px, 2vw, 21px);
}

.hero-tags {
  flex-wrap: wrap;
  margin: 0 0 26px;
}

.hero-tags span,
.card-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn-primary {
  color: var(--white);
  background: var(--orange-500);
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.32);
}

.btn-primary:hover {
  background: var(--orange-600);
}

.btn-ghost {
  color: var(--white);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--white);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.quick-panel,
.content-section,
.detail-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 52px 22px 0;
}

.quick-inner {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  gap: 24px;
  padding: 30px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.quick-inner h2,
.section-title h2,
.player-section h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.quick-inner p,
.section-title p,
.detail-content p,
.category-card-body p {
  color: var(--slate-600);
}

.category-pills {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.category-pills a {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-pills a:hover {
  background: var(--orange-500);
  color: var(--white);
  transform: translateY(-2px);
}

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

.section-title p {
  margin: 10px 0 0;
  max-width: 760px;
}

.section-more {
  flex: 0 0 auto;
  color: var(--orange-600);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.search-page-panel {
  grid-template-columns: minmax(260px, 1fr) 200px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: var(--slate-50);
}

.search-box span {
  color: var(--orange-500);
  font-size: 22px;
  font-weight: 900;
}

.search-box input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: var(--slate-50);
  color: var(--slate-900);
  outline: none;
}

.search-box input {
  min-height: 0;
  border: 0;
  background: transparent;
}

.filter-panel select {
  padding: 0 13px;
}

.search-box:focus-within,
.filter-panel select:focus {
  border-color: var(--orange-500);
}

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

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

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

.mt-large {
  margin-top: 22px;
}

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

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

.card-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-600));
}

.movie-card:not(.movie-card-large) .card-poster {
  aspect-ratio: 3 / 4;
}

.card-poster img,
.compact-poster img,
.detail-poster img,
.category-thumbs img,
.rank-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .card-poster img,
.movie-card:hover .compact-poster img,
.category-card:hover .category-thumbs img {
  transform: scale(1.08);
}

.card-body {
  padding: 18px;
}

.card-meta {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.card-meta span {
  background: var(--slate-100);
  color: var(--slate-600);
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.28;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.movie-card:hover strong {
  color: var(--orange-600);
}

.card-body p,
.compact-body p,
.rank-item p {
  display: -webkit-box;
  margin: 0;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-compact {
  display: flex;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
}

.compact-poster {
  flex: 0 0 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 13px;
  background: var(--slate-200);
}

.compact-body {
  min-width: 0;
}

.compact-body strong {
  display: block;
  margin: 5px 0 4px;
  font-weight: 900;
  line-height: 1.25;
}

.compact-body span {
  color: var(--slate-500);
  font-size: 12px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 88px 96px 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius-lg);
}

.rank-number {
  color: var(--orange-600);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.rank-item img {
  width: 96px;
  height: 96px;
  border-radius: 15px;
}

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

.rank-item em {
  display: inline-block;
  margin-top: 8px;
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.page-hero {
  min-height: 360px;
  display: grid;
  align-items: end;
  padding: 96px max(22px, calc((100vw - var(--max-width)) / 2)) 56px;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.36), transparent 32%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero h1 {
  margin-top: 18px;
}

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

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

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

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

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

.category-card-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 950;
}

.category-card-body p {
  margin: 0 0 16px;
}

.category-card-body span {
  color: var(--orange-600);
  font-weight: 900;
}

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

.breadcrumbs a {
  color: var(--orange-600);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
  color: var(--white);
  box-shadow: var(--shadow-xl);
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 3 / 4;
  background: var(--slate-800);
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-meta {
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.player-section,
.detail-content {
  margin-top: 34px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.player-section h2,
.detail-content h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 3vw, 34px);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--slate-950);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--slate-950);
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.28), rgba(2, 6, 23, 0.56));
}

.play-cover span {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: var(--orange-500);
  box-shadow: 0 20px 45px rgba(249, 115, 22, 0.45);
  font-size: 38px;
  transform: translateX(4px);
}

.play-cover.is-hidden {
  display: none;
}

.detail-content p {
  margin: 0 0 20px;
  color: var(--slate-700);
  font-size: 17px;
}

.detail-related {
  padding-left: 0;
  padding-right: 0;
}

.no-results {
  display: none;
  margin: 20px 0 0;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--slate-600);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  margin-top: 70px;
  background: var(--slate-900);
  color: var(--slate-200);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.footer-inner p {
  max-width: 520px;
  color: var(--slate-500);
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-bottom {
  padding: 18px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--slate-500);
  text-align: center;
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-slider {
    height: 68vh;
    min-height: 500px;
  }

  .hero-content {
    bottom: 68px;
  }

  .quick-inner,
  .filter-panel,
  .search-page-panel,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-pills,
  .footer-links {
    justify-content: flex-start;
  }

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

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

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

  .brand {
    font-size: 19px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

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

  .hero-content {
    bottom: 74px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .detail-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .content-section,
  .quick-panel,
  .detail-layout {
    padding-top: 34px;
  }

  .quick-inner,
  .player-section,
  .detail-content,
  .detail-hero {
    padding: 20px;
  }

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

  .movie-grid.three,
  .movie-grid.four,
  .category-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-item img {
    width: 100%;
    height: 190px;
  }

  .page-hero {
    min-height: 330px;
    padding-top: 78px;
  }

  .category-thumbs {
    height: 120px;
  }

  .play-cover span {
    width: 72px;
    height: 72px;
    font-size: 30px;
  }
}
