:root {
  --ocean-50: #f0f9ff;
  --ocean-100: #e0f2fe;
  --ocean-400: #38bdf8;
  --ocean-600: #0284c7;
  --ocean-700: #0369a1;
  --island-50: #f0fdf4;
  --island-600: #16a34a;
  --sand-100: #fef3c7;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(2, 132, 199, 0.08);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  color: var(--white);
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.24);
}

.brand-text {
  background: linear-gradient(90deg, var(--ocean-600), var(--island-600));
  background-clip: text;
  color: transparent;
  font-size: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--gray-700);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  gap: 48px;
  align-items: center;
  padding: 84px calc((100vw - 1180px) / 2 + 20px) 70px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.64), rgba(17, 24, 39, 0.18)),
    var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.1);
}

.hero-slide::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(0deg, var(--gray-50), rgba(249, 250, 251, 0));
}

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

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 720px;
  color: var(--white);
}

.hero-tags,
.tag-row,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.meta-line span,
.score-pill,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(240, 249, 255, 0.95);
  color: var(--ocean-700);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
}

.hero-content h1 {
  max-width: 860px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 1.8vw, 20px);
}

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

.primary-btn,
.ghost-btn,
.section-action,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.filter-panel button {
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  color: var(--white);
  box-shadow: 0 12px 26px rgba(2, 132, 199, 0.24);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-controls {
  position: absolute;
  right: calc((100vw - 1180px) / 2 + 20px);
  bottom: 42px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

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

.content-section,
.page-main,
.detail-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px;
}

.page-main,
.detail-main {
  padding-top: 34px;
}

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

.section-heading span,
.page-hero span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--ocean-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-header h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--gray-600);
}

.section-action {
  flex: 0 0 auto;
  background: var(--white);
  color: var(--ocean-700);
  box-shadow: var(--shadow-soft);
}

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

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: var(--gray-900);
  aspect-ratio: 3 / 4;
}

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

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

.poster-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.05) 55%, rgba(0, 0, 0, 0));
}

.poster-wrap figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: var(--white);
}

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

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

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

.tag-row span {
  background: var(--ocean-50);
  color: var(--ocean-700);
  font-size: 12px;
  padding: 4px 10px;
}

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

.category-tile,
.category-panel-cover {
  position: relative;
  display: flex;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: var(--white);
  background-image:
    linear-gradient(135deg, rgba(2, 132, 199, 0.88), rgba(22, 163, 74, 0.78)),
    var(--tile-image);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
  flex-direction: column;
  justify-content: end;
  padding: 20px;
}

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

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 4px;
  font-size: 15px;
}

.category-tile em {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.28), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(22, 163, 74, 0.18), transparent 26%),
    var(--white);
  box-shadow: var(--shadow-soft);
  padding: 44px;
}

.slim-hero,
.category-hero {
  margin-bottom: 34px;
}

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

.category-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-panel-cover {
  align-items: end;
  min-height: 100%;
  padding: 18px;
  font-size: 24px;
  font-weight: 900;
}

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

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

.category-panel-body p {
  margin: 0 0 12px;
  color: var(--gray-600);
}

.category-panel-body strong {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--ocean-600);
}

.category-panel-body ul,
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-panel-body li a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  color: var(--gray-700);
  font-size: 14px;
}

.category-panel-body li a:hover {
  color: var(--ocean-600);
}

.filter-panel {
  margin-bottom: 26px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--gray-300);
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-900);
  outline: 0;
  padding: 0 13px;
}

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

.filter-count {
  margin: 14px 0 0;
  color: var(--gray-600);
  font-size: 14px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-cover img {
  width: 96px;
  height: 128px;
  object-fit: cover;
}

.ranking-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: var(--white);
  font-weight: 900;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.ranking-info h2 a:hover {
  color: var(--ocean-600);
}

.ranking-info p {
  margin: 0 0 12px;
  color: var(--gray-600);
}

.detail-main {
  max-width: 1240px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gray-600);
  font-size: 14px;
}

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

.player-section {
  margin-bottom: 32px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.56), rgba(2, 132, 199, 0.28));
  color: var(--white);
  cursor: pointer;
}

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

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.34);
  font-size: 28px;
}

.play-copy {
  max-width: 86%;
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 900;
  text-align: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
}

.detail-header,
.text-card,
.side-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  padding: 26px;
}

.detail-header {
  margin-bottom: 22px;
}

.detail-header h1 {
  margin: 12px 0 16px;
}

.detail-tags {
  margin-top: 16px;
}

.text-card {
  margin-bottom: 20px;
}

.text-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.text-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.side-related .movie-card-link {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: stretch;
}

.side-related .poster-wrap {
  height: 124px;
  aspect-ratio: auto;
}

.side-related .poster-wrap figcaption,
.side-related .tag-row,
.compact-card .tag-row {
  display: none;
}

.side-related .movie-card-body {
  padding: 12px;
}

.side-related .movie-card-body h3 {
  min-height: auto;
  font-size: 15px;
}

.side-related .movie-card-body p {
  min-height: auto;
  font-size: 13px;
}

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

.compact-card .movie-card-body p {
  display: none;
}

.compact-card .movie-card-body h3 {
  min-height: 44px;
  font-size: 15px;
}

.site-footer {
  margin-top: 50px;
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px;
}

.footer-logo {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 24px;
}

.footer-brand p {
  max-width: 620px;
  margin: 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer li {
  margin: 8px 0;
}

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

[hidden] {
  display: none !important;
}

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

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

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

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

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-hover);
    padding: 10px;
  }

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

  .nav-link {
    border-radius: 12px;
    padding: 12px 14px;
  }

  .nav-link:hover,
  .nav-link.is-active {
    background: var(--ocean-50);
  }

  .hero-slider {
    height: auto;
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 72px 20px 96px;
  }

  .hero-poster {
    max-width: 240px;
    margin: 0 auto;
  }

  .hero-controls {
    right: auto;
    left: 20px;
  }

  .section-heading {
    display: block;
  }

  .section-action {
    margin-top: 16px;
  }

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

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

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

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

  .ranking-cover img {
    width: 82px;
    height: 110px;
  }

  .score-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .page-hero,
  .detail-header,
  .text-card,
  .side-card {
    padding: 22px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .all-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .content-section,
  .page-main,
  .detail-main {
    padding-right: 14px;
    padding-left: 14px;
  }
}
