:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --secondary-600: #d97706;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-900: #171717;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--neutral-900);
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.32);
  font-size: 14px;
}

.brand-text {
  font-size: 20px;
}

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

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

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(340px, 30vw);
}

.input-field {
  width: 100%;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  outline: none;
  color: var(--neutral-900);
  background: #ffffff;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.search-btn,
.btn-primary,
.btn-ghost {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 18px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.search-btn,
.btn-primary {
  color: #ffffff;
  background: var(--primary-600);
}

.search-btn:hover,
.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

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

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

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

.mobile-panel-inner {
  padding: 16px 0 20px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  color: var(--neutral-700);
  font-weight: 700;
}

.mobile-link.is-active {
  color: var(--primary-600);
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(14, 165, 233, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 600px;
  color: #ffffff;
}

.hero-copy {
  max-width: 720px;
  padding: 60px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-100);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  line-height: 1.08;
}

.hero-copy h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: clamp(24px, 3vw, 42px);
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 1.5vw, 20px);
}

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

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.hero-search-card {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 72px;
  z-index: 6;
  width: min(620px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-search-card form {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.section-block {
  padding: 56px 0;
}

.bg-soft {
  background: var(--neutral-50);
}

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

.section-title-row h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--neutral-900);
  line-height: 1.2;
}

.section-title-row h2 {
  font-size: clamp(24px, 2vw, 34px);
}

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

.text-link:hover {
  color: var(--primary-700);
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 2px 12px;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.scroll-item {
  flex: 0 0 288px;
  scroll-snap-align: start;
}

.scroll-actions {
  display: flex;
  gap: 8px;
}

.scroll-actions button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.scroll-actions button:hover {
  color: var(--primary-700);
  background: var(--primary-100);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--neutral-200), var(--neutral-100));
}

.movie-card.large .poster-wrap {
  height: 420px;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.year-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: rgba(217, 119, 6, 0.88);
}

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

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--neutral-900);
  font-size: 18px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--primary-600);
}

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

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

.movie-meta span {
  border-radius: 8px;
  padding: 3px 8px;
  background: var(--neutral-100);
}

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

.feature-side {
  display: grid;
  gap: 18px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.horizontal-card .poster-wrap {
  height: 100%;
  min-height: 160px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: var(--radius);
  background: var(--neutral-900);
  box-shadow: var(--shadow-soft);
}

.category-tile a,
.category-tile img,
.category-tile-overlay {
  position: absolute;
  inset: 0;
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.78));
}

.category-tile-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 20px;
  color: #ffffff;
}

.category-tile-content h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile-content p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.page-hero {
  padding: 58px 0 34px;
  background:
    radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.16), transparent 32%),
    linear-gradient(135deg, #ffffff, #f6fbff);
}

.page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(32px, 3vw, 46px);
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--neutral-600);
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: var(--radius);
  color: var(--neutral-600);
  background: var(--neutral-50);
  text-align: center;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 160px minmax(0, 1fr) 130px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--secondary-600), #f59e0b);
  font-weight: 900;
}

.rank-thumb {
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--neutral-100);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--neutral-600);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-score {
  color: var(--primary-700);
  font-weight: 900;
  text-align: right;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0;
  color: var(--neutral-600);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
  align-items: stretch;
  margin-bottom: 36px;
}

.detail-cover {
  overflow: hidden;
  min-height: 520px;
  border-radius: 24px;
  background: var(--neutral-100);
  box-shadow: var(--shadow-card);
}

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

.detail-info {
  padding: 38px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 8%, rgba(14, 165, 233, 0.12), transparent 34%),
    var(--neutral-50);
}

.detail-info h1 {
  font-size: clamp(32px, 4vw, 56px);
}

.detail-lead {
  margin: 18px 0 0;
  color: var(--neutral-700);
  font-size: 18px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.detail-meta-grid div {
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
}

.detail-meta-grid span {
  display: block;
  color: var(--neutral-500);
  font-size: 13px;
}

.detail-meta-grid strong {
  color: var(--neutral-900);
}


.detail-info .btn-ghost {
  color: var(--primary-700);
  background: var(--primary-100);
  border: 1px solid rgba(14, 165, 233, 0.18);
}

.detail-info .btn-ghost:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.player-section,
.text-section,
.related-section {
  margin: 44px 0;
}

.player-section h2,
.text-section h2,
.related-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #050505;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #050505;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-cover span:last-child {
  margin-top: 96px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.play-ring {
  position: absolute;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 0 0 14px rgba(14, 165, 233, 0.18);
  font-size: 34px;
}

.text-section {
  padding: 34px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.text-section p {
  margin: 0 0 22px;
  color: var(--neutral-700);
  font-size: 17px;
}

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

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

.footer-grid p {
  max-width: 520px;
  color: var(--neutral-400);
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: var(--neutral-300);
}

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

.footer-bottom {
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--neutral-500);
  font-size: 14px;
}

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

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

  .detail-hero {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-search-card {
    bottom: 54px;
  }

  .hero-search-card form,
  .mobile-search {
    flex-direction: column;
  }

  .feature-grid,
  .page-hero-inner,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-row {
    grid-template-columns: 48px 110px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

  .detail-cover {
    min-height: 460px;
  }
}

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

  .hero-control {
    display: none;
  }

  .hero-copy {
    padding-bottom: 140px;
  }

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

  .poster-wrap {
    height: 260px;
  }

  .scroll-item {
    flex-basis: 82vw;
  }

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

  .rank-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-thumb {
    display: none;
  }

  .rank-score {
    grid-column: 2;
  }

  .detail-info,
  .text-section {
    padding: 24px;
  }

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