:root {
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;
  --primary-400: #2dd4bf;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --primary-700: #0f766e;
  --primary-900: #134e4a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius-lg: 16px;
  --radius-xl: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 13px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 10px 22px rgba(13, 148, 136, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary-600);
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--gray-200);
  padding: 10px 20px 18px;
  background: var(--white);
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

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

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  background: radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.26), transparent 32%),
              linear-gradient(135deg, #0f172a, #111827 60%, #134e4a);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-slide img.is-missing,
.poster-wrap img.is-missing,
.rank-item img.is-missing {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  width: min(680px, 92%);
  margin-left: clamp(24px, 8vw, 88px);
  color: var(--white);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.9);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

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

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

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

.btn-light {
  color: var(--gray-900);
  background: var(--white);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 30px;
  background: var(--white);
}

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

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

.section-kicker {
  display: block;
  color: var(--primary-700);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.page-title h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--gray-600);
}

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

.category-tile {
  padding: 22px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--primary-400);
}

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

.category-tile span {
  color: var(--primary-700);
  font-weight: 800;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--gray-600);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 900;
  text-align: center;
  background: radial-gradient(circle at 22% 18%, rgba(45, 212, 191, 0.32), transparent 34%);
  z-index: 0;
}

.poster-wrap img:not(.is-missing) + .poster-fallback {
  display: none;
}

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  min-height: 54px;
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.45;
}

.movie-card p {
  display: -webkit-box;
  min-height: 67px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 700;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.rank-number {
  color: var(--primary-700);
  font-size: 24px;
  font-weight: 900;
}

.rank-item img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.rank-info strong {
  display: block;
  color: var(--gray-900);
}

.rank-info em {
  display: block;
  margin-top: 4px;
  color: var(--gray-600);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding: clamp(38px, 7vw, 80px);
  border-radius: 28px;
  color: var(--white);
  background: radial-gradient(circle at 18% 16%, rgba(45, 212, 191, 0.32), transparent 32%),
              linear-gradient(135deg, #111827, #134e4a);
  box-shadow: var(--shadow-soft);
}

.page-title h1 {
  color: inherit;
}

.breadcrumb {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

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

.toolbar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--gray-800);
  background: var(--white);
  font: inherit;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-card,
.side-card,
.content-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-card {
  overflow: hidden;
}

.player {
  position: relative;
  overflow: hidden;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.44));
}

.player-start {
  pointer-events: auto;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(20, 184, 166, 0.92);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  font-size: 34px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-start:hover {
  transform: scale(1.08);
}

.player.is-loaded .player-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-message {
  padding: 12px 16px;
  color: var(--white);
  background: var(--gray-900);
  font-size: 14px;
}

.detail-body {
  padding: 24px;
}

.detail-body h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0;
}

.info-chips span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 800;
}

.content-card {
  margin-top: 22px;
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  color: var(--gray-700);
  text-align: justify;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

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

.related-link {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
}

.related-link img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.related-link strong {
  display: block;
  line-height: 1.35;
}

.related-link span {
  color: var(--gray-600);
  font-size: 12px;
}

.site-footer {
  margin-top: 70px;
  padding: 48px 0;
  color: #cbd5e1;
  background: var(--gray-900);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

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

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
}

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

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.empty-state {
  display: none;
  padding: 30px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  background: var(--white);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 560px;
    height: 72vh;
    border-radius: 20px;
  }

  .hero-content {
    margin-left: 24px;
    margin-right: 24px;
  }

  .hero-control {
    display: none;
  }

  .section-head {
    display: block;
  }

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

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

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

@media (max-width: 540px) {
  .nav-shell,
  .hero-wrap,
  .section,
  .page-hero,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .category-grid,
  .movie-grid,
  .movie-grid.compact,
  .rank-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-item img {
    width: 58px;
    height: 78px;
  }

  .page-hero {
    padding: 30px 22px;
    border-radius: 20px;
  }

  .detail-body,
  .content-card {
    padding: 18px;
  }
}
