:root {
  --primary-50: #e6f1ff;
  --primary-100: #b3d9ff;
  --primary-600: #0059c0;
  --primary-700: #00438d;
  --accent-500: #ff6b00;
  --neutral-50: #f8f9fa;
  --neutral-100: #e9ecef;
  --neutral-200: #dee2e6;
  --neutral-300: #ced4da;
  --neutral-400: #adb5bd;
  --neutral-500: #6c757d;
  --neutral-600: #495057;
  --neutral-700: #343a40;
  --neutral-800: #212529;
  --neutral-900: #0d1117;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-soft-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.1), 0 20px 25px -5px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--neutral-50);
  color: var(--neutral-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--neutral-200);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-row {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-600);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  box-shadow: var(--shadow-soft);
}

.desktop-nav,
.mobile-nav-list {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: var(--neutral-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-current {
  color: var(--primary-600);
}

.header-search {
  position: relative;
  min-width: 220px;
}

.header-search input,
.filter-input,
.search-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  background: var(--white);
  color: var(--neutral-900);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  padding: 10px 44px 10px 14px;
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--neutral-500);
}

.header-search button:hover {
  color: var(--primary-600);
}

.header-search input:focus,
.filter-input:focus,
.search-input:focus,
.filter-select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(0, 89, 192, 0.16);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--neutral-200);
  background: var(--white);
}

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

.mobile-panel-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 20px 22px;
}

.mobile-nav-list {
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--neutral-900);
}

.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-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.64) 42%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-panel {
  max-width: 660px;
  color: var(--white);
}

.hero-badge,
.card-category,
.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  line-height: 1;
}

.hero-badge {
  padding: 10px 16px;
  margin-bottom: 18px;
  background: var(--accent-500);
  color: var(--white);
  font-size: 14px;
  font-weight: 750;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 620px;
  margin: 0 0 28px;
  color: var(--neutral-300);
  font-size: 18px;
  line-height: 1.75;
}

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

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

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

.btn-primary {
  background: var(--primary-600);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(0, 89, 192, 0.28);
}

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

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

.btn-light:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: var(--white);
  backdrop-filter: blur(8px);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

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

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

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

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

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

.section {
  padding: 54px 0 0;
}

.section-card {
  margin-top: 54px;
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--primary-50), #fff3e6);
  box-shadow: var(--shadow-soft);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--neutral-900);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 850;
}

.section-title::before {
  content: "";
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent-500);
}

.section-desc {
  margin: 8px 0 0;
  color: var(--neutral-600);
}

.section-more {
  color: var(--primary-600);
  font-weight: 750;
}

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

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--neutral-900);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
}

.card-category {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 7px 10px;
  background: var(--accent-500);
  color: var(--white);
  font-size: 12px;
  font-weight: 750;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--neutral-900);
  font-size: 18px;
  line-height: 1.32;
  font-weight: 800;
}

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

.card-desc {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--neutral-600);
  font-size: 14px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--neutral-500);
  font-size: 13px;
}

.meta-pill {
  padding: 7px 10px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 650;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 9px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 650;
}

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

.category-tile {
  min-height: 146px;
  padding: 22px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: var(--neutral-900);
  font-size: 20px;
}

.category-tile span {
  color: var(--neutral-600);
  font-size: 14px;
  line-height: 1.6;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 88px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  color: var(--accent-500);
  font-size: 20px;
  font-weight: 850;
  text-align: center;
}

.rank-cover {
  overflow: hidden;
  border-radius: 12px;
  background: var(--neutral-900);
}

.rank-cover img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.rank-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.rank-title:hover {
  color: var(--primary-600);
}

.rank-desc {
  margin: 0;
  color: var(--neutral-600);
  font-size: 14px;
  line-height: 1.55;
}

.rank-action {
  color: var(--primary-600);
  font-weight: 750;
  white-space: nowrap;
}

.page-hero {
  padding: 54px 0;
  color: var(--white);
  background: linear-gradient(110deg, var(--primary-600), var(--primary-700));
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 850;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--primary-100);
  font-size: 17px;
  line-height: 1.8;
}

.filter-panel {
  margin: 34px 0 26px;
  padding: 18px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 14px;
}

.filter-input,
.search-input,
.filter-select {
  padding: 13px 14px;
}

.search-panel {
  margin-top: -26px;
  padding: 20px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft-lg);
}

.empty-state {
  display: none;
  padding: 44px 20px;
  border-radius: 20px;
  background: var(--white);
  color: var(--neutral-600);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0;
  color: var(--neutral-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-600);
  font-weight: 700;
}

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

.video-stage {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  box-shadow: var(--shadow-soft-lg);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-600);
  box-shadow: 0 16px 36px rgba(0, 89, 192, 0.34);
  font-size: 28px;
}

.player-cover strong {
  max-width: 720px;
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.18;
}

.detail-card,
.sidebar-card {
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  font-weight: 850;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--neutral-200);
}

.detail-section {
  margin-top: 24px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: var(--neutral-900);
  font-size: 22px;
  font-weight: 820;
}

.detail-section p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}

.sidebar-card {
  padding: 20px;
  margin-bottom: 22px;
}

.side-poster {
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 16px;
  background: var(--neutral-900);
}

.side-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.related-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  margin: -8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: var(--neutral-50);
}

.related-thumb {
  overflow: hidden;
  border-radius: 12px;
  background: var(--neutral-900);
}

.related-thumb img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.related-title {
  margin: 0 0 6px;
  color: var(--neutral-900);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.related-meta {
  color: var(--neutral-500);
  font-size: 13px;
}

.sidebar-card .footer-title {
  color: var(--neutral-900);
}

.category-tile span {
  display: block;
}

.category-tile span + span {
  margin-top: 10px;
  color: var(--primary-700);
}

.site-footer {
  margin-top: 64px;
  background: var(--neutral-800);
  color: var(--neutral-300);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-title {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 20px;
  font-weight: 850;
}

.footer-text,
.footer-link {
  color: var(--neutral-400);
  font-size: 14px;
  line-height: 1.8;
}

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

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

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid var(--neutral-700);
  color: var(--neutral-500);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .desktop-nav,
  .header-search.desktop-only {
    display: none;
  }

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

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

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

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

@media (max-width: 760px) {
  .header-row {
    height: 62px;
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    height: 520px;
  }

  .hero-control {
    display: none;
  }

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

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

  .section-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

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

  .filter-row {
    grid-template-columns: 1fr;
  }

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

  .rank-action {
    display: none;
  }

  .detail-card {
    padding: 22px;
  }

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

@media (max-width: 480px) {
  .container,
  .header-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .hero {
    height: 500px;
  }

  .hero-badge {
    padding: 8px 12px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
