:root {
  --primary-900: #08335f;
  --primary-800: #075089;
  --primary-700: #006fc6;
  --primary-600: #1683dc;
  --accent-500: #14b8a2;
  --accent-300: #7dd3c7;
  --neutral-950: #0f172a;
  --neutral-900: #111827;
  --neutral-800: #1f2937;
  --neutral-700: #374151;
  --neutral-600: #4b5563;
  --neutral-300: #d1d5db;
  --neutral-200: #e5e7eb;
  --neutral-100: #f3f4f6;
  --neutral-50: #f9fafb;
  --white: #ffffff;
  --shadow-md: 0 14px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 22px 45px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
  box-shadow: 0 10px 28px rgba(8, 51, 95, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--primary-900);
  background: var(--accent-300);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent-300);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-nav-link {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.page-stack {
  display: grid;
  gap: 64px;
  padding: 36px 0 72px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--neutral-900);
  box-shadow: var(--shadow-lg);
}

.hero-track {
  display: flex;
  height: 560px;
  transition: transform 0.5s ease;
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.90), rgba(3, 7, 18, 0.46), rgba(3, 7, 18, 0.10)),
    linear-gradient(0deg, rgba(3, 7, 18, 0.78), transparent 45%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 78px);
  bottom: clamp(70px, 12vw, 108px);
  width: min(680px, calc(100% - 48px));
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 12px;
  color: var(--accent-300);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
}

.hero-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 19px);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(20, 184, 162, 0.72);
  font-size: 13px;
}

.hero-actions,
.section-more {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.primary-button {
  color: var(--white);
  background: var(--primary-700);
  box-shadow: 0 14px 25px rgba(0, 111, 198, 0.28);
}

.secondary-button {
  color: var(--primary-700);
  background: var(--white);
  border: 1px solid rgba(0, 111, 198, 0.20);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  font-size: 34px;
  transition: background 0.2s ease, opacity 0.2s ease;
  transform: translateY(-50%);
}

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

.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;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-search {
  position: absolute;
  right: clamp(20px, 6vw, 60px);
  bottom: 40px;
  display: flex;
  width: min(420px, calc(100% - 40px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 0;
  outline: 0;
}

.hero-search input {
  flex: 1;
  padding: 13px 16px;
  color: var(--white);
  background: transparent;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
  border: 0;
  padding: 0 18px;
  color: var(--white);
  background: var(--accent-500);
  cursor: pointer;
  font-weight: 700;
}

.content-section {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow-md);
}

.content-section.category-preview:nth-of-type(odd) {
  background: linear-gradient(180deg, var(--white), #f8fbff);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.article-section h2,
.player-section h2 {
  margin: 0 0 8px;
  color: var(--neutral-900);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.section-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--neutral-600);
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.text-link {
  color: var(--primary-700);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--white);
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--neutral-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 58%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-indicator {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  opacity: 0;
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: opacity 0.24s ease;
}

.movie-card:hover .play-indicator {
  opacity: 1;
}

.duration-badge,
.category-badge,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.70);
}

.category-badge {
  left: 10px;
  top: 10px;
  background: var(--accent-500);
}

.rank-badge {
  right: 10px;
  top: 10px;
  background: var(--primary-700);
}

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

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

.movie-card-body h2 a:hover {
  color: var(--primary-700);
}

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

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

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

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 20% 10%, rgba(20, 184, 162, 0.40), transparent 36%),
    linear-gradient(135deg, var(--primary-900), var(--primary-700));
}

.page-hero .container {
  padding: 64px 0;
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--accent-300);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.category-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.category-posters img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: var(--neutral-200);
}

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

.category-card p {
  margin: 0 0 12px;
  color: var(--neutral-600);
}

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

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  color: var(--neutral-900);
  background: var(--neutral-50);
}

.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at 18% 20%, rgba(20, 184, 162, 0.38), transparent 34%),
    linear-gradient(135deg, var(--primary-900), #03111f 68%);
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: clamp(26px, 5vw, 54px);
  align-items: center;
  padding: 52px 0;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-summary h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 0 24px;
}

.detail-meta div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
}

.detail-meta dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--white);
  font-weight: 800;
}

.detail-page {
  gap: 34px;
}

.player-section {
  padding: clamp(22px, 4vw, 34px);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  border-radius: var(--radius-xl);
  background: var(--neutral-950);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
  font-size: 38px;
}

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

.article-section {
  max-width: none;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0 28px;
}

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

.site-footer p {
  margin: 10px 0 0;
  color: var(--neutral-300);
}

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

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

.site-footer a:hover {
  color: var(--accent-300);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.is-hidden-card {
  display: none !important;
}

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero-carousel,
  .hero-track {
    min-height: 520px;
    height: 520px;
  }

  .hero-search {
    left: 20px;
    right: 20px;
    bottom: 24px;
    width: auto;
  }

  .hero-content {
    bottom: 110px;
  }

  .row-heading {
    display: block;
  }

  .text-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .detail-cover {
    max-width: 280px;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .page-stack {
    gap: 34px;
    padding: 22px 0 46px;
  }

  .hero-carousel,
  .hero-track {
    min-height: 500px;
    height: 500px;
    border-radius: 18px;
  }

  .hero-content {
    left: 20px;
    bottom: 116px;
    width: calc(100% - 40px);
  }

  .hero-control {
    display: none;
  }

  .hero-tags span:nth-child(n+4) {
    display: none;
  }

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

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

  .content-section,
  .player-section {
    padding: 18px;
    border-radius: 18px;
  }

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

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

  .footer-bottom {
    display: grid;
  }
}
