:root {
  --ocean-600: #0284c7;
  --ocean-700: #0369a1;
  --ocean-400: #38bdf8;
  --island-600: #16a34a;
  --sand-600: #ca8a04;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.nav-inner {
  max-width: 80rem;
  height: 4rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
}

.brand-text,
.footer-brand span:last-child {
  font-size: 1.45rem;
  background: linear-gradient(90deg, var(--ocean-600), var(--island-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.25);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 650;
  color: var(--gray-600);
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  background: var(--gray-100);
  border-radius: 0.8rem;
  padding: 0.55rem 0.75rem;
  font-size: 1.1rem;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: max(1rem, calc((100vw - 80rem) / 2 + 1rem));
  right: max(1rem, calc((100vw - 80rem) / 2 + 1rem));
  bottom: 4rem;
  max-width: 760px;
  color: #fff;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--ocean-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
}

.hero-content p {
  margin: 1rem 0 0;
  max-width: 680px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags {
  margin-top: 1.2rem;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ocean-700);
  background: #e0f2fe;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.primary-btn,
.ghost-btn,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 2.8rem;
  padding: 0 1.3rem;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button {
  color: #fff;
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  box-shadow: 0 16px 34px rgba(2, 132, 199, 0.28);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(5px);
}

.ghost-btn.dark {
  color: var(--ocean-700);
  background: #e0f2fe;
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
}

.hero-dots button {
  width: 2.2rem;
  height: 0.3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.active {
  background: #fff;
}

.search-panel {
  margin-top: -2rem;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}

.search-panel-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.4rem;
  border-radius: var(--radius-2xl);
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 1.2rem;
  align-items: center;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-panel h2,
.content-section h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
}

.home-search {
  display: flex;
  gap: 0.75rem;
}

.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0 1rem;
  font: inherit;
  outline: none;
  background: #fff;
}

.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--ocean-600);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.content-section {
  padding: 4rem 1rem;
}

.section-white {
  background: #fff;
}

.section-inner,
.page-wrap {
  max-width: 80rem;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

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

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.7rem;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.1rem;
}

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

.movie-card {
  min-width: 0;
}

.poster-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  aspect-ratio: 3 / 4;
  background: var(--gray-200);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.poster-card:hover img {
  transform: scale(1.1);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18), transparent);
  opacity: 0.86;
  transition: opacity 0.25s ease;
}

.poster-card:hover .poster-shade {
  opacity: 0.95;
}

.poster-content {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  color: #fff;
}

.poster-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster-content p {
  margin: 0;
  color: var(--gray-300);
  font-size: 0.86rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.play-chip,
.rank-badge {
  position: absolute;
  top: 0.8rem;
  z-index: 2;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  background: rgba(2, 132, 199, 0.92);
}

.play-chip {
  right: 0.8rem;
}

.rank-badge {
  left: 0.8rem;
  background: rgba(202, 138, 4, 0.95);
}

.card-meta {
  padding: 0.75rem 0.15rem 0;
}

.card-category {
  display: inline-flex;
  margin-top: 0.65rem;
  color: var(--ocean-700);
  font-size: 0.88rem;
  font-weight: 800;
}

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

.category-tile,
.category-card {
  display: block;
  border-radius: var(--radius-2xl);
  padding: 1.25rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.section-white .category-tile {
  background: var(--gray-50);
}

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

.category-tile span {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 850;
  color: var(--gray-900);
}

.category-tile p,
.category-card p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
  font-size: 0.92rem;
}

.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 3rem 1rem 1.5rem;
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 2rem;
}

.footer-main p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
}

.site-footer li {
  margin: 0 0 0.55rem;
}

.site-footer a:hover {
  color: var(--ocean-400);
}

.footer-bottom {
  max-width: 80rem;
  margin: 2rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--gray-500);
}

.page-wrap {
  padding: 2rem 1rem 4rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: var(--gray-600);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

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

.page-hero {
  border-radius: var(--radius-2xl);
  padding: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 35%), linear-gradient(135deg, #0f172a, #075985 55%, #166534);
  box-shadow: var(--shadow-soft);
}

.page-hero p:last-child {
  max-width: 780px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: var(--radius-2xl);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-selects select {
  min-width: 150px;
}

.empty-state {
  padding: 2rem;
  border-radius: var(--radius-2xl);
  text-align: center;
  background: #fff;
  color: var(--gray-600);
  box-shadow: var(--shadow-soft);
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  padding: 1rem;
}

.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  aspect-ratio: 4 / 3;
  background: var(--gray-200);
}

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

.category-cover span {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  right: 0.8rem;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  color: #fff;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
}

.category-card-body h2 {
  margin: 0 0 0.5rem;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.category-samples a {
  color: var(--ocean-700);
  font-weight: 700;
  font-size: 0.9rem;
}

.rank-list {
  display: grid;
  gap: 0.8rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 84px 1fr 96px;
  gap: 1rem;
  align-items: center;
  border-radius: var(--radius-xl);
  padding: 0.8rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-index {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sand-600), var(--ocean-600));
}

.rank-poster {
  display: block;
  overflow: hidden;
  border-radius: 0.9rem;
  aspect-ratio: 3 / 4;
  background: var(--gray-200);
}

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

.rank-title {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 1.08rem;
  font-weight: 850;
}

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

.rank-info p {
  margin: 0 0 0.65rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.rank-side {
  text-align: right;
}

.rank-side strong {
  display: block;
  color: var(--ocean-700);
  font-size: 1.35rem;
}

.rank-side span {
  color: var(--gray-500);
  font-size: 0.88rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-2xl);
  padding: clamp(1rem, 3vw, 2rem);
  color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.28), transparent 30%), linear-gradient(135deg, #0f172a, #075985 54%, #166534);
  box-shadow: var(--shadow-soft);
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  aspect-ratio: 3 / 4;
  background: var(--gray-200);
  box-shadow: var(--shadow-hover);
}

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

.detail-info h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.08;
}

.detail-line {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.8;
}

.large-tags {
  margin-top: 1rem;
}

.player-section {
  margin: 1.5rem 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow-hover);
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.12));
  cursor: pointer;
  z-index: 2;
}

.player-cover.hidden {
  display: none;
}

.player-cover button {
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.8rem;
  font: inherit;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  cursor: pointer;
  box-shadow: var(--shadow-hover);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

.detail-content,
.detail-side {
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-content h2,
.detail-side h2 {
  margin-top: 0;
}

.detail-content p {
  color: var(--gray-700);
  line-height: 2;
  font-size: 1.02rem;
}

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  margin-top: 0.8rem;
  color: var(--gray-500);
  font-size: 0.88rem;
}

.detail-side dd {
  margin: 0.2rem 0 0;
  font-weight: 750;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.flat-inner {
  max-width: none;
}

[hidden] {
  display: none !important;
}

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

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

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 4.4rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 1.1rem;
    padding: 0.6rem;
    background: #fff;
    box-shadow: var(--shadow-hover);
  }

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

  .nav-link {
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--gray-100);
  }

  .search-panel-inner,
  .filter-bar,
  .detail-hero,
  .detail-layout,
  .footer-inner,
  .category-card {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-row {
    grid-template-columns: 42px 70px 1fr;
  }

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

@media (max-width: 620px) {
  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    bottom: 4.5rem;
  }

  .hero-content h1 {
    font-size: 2.45rem;
  }

  .home-search,
  .filter-selects {
    flex-direction: column;
  }

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

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

  .content-section {
    padding: 3rem 1rem;
  }

  .rank-row {
    grid-template-columns: 38px 62px 1fr;
    gap: 0.7rem;
  }

  .rank-info p,
  .rank-row .tag-row {
    display: none;
  }

  .site-footer ul {
    columns: 1;
  }
}
