:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-600: #2563eb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 42%, var(--white) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--sky-500), var(--blue-600));
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.22);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand {
  font-size: clamp(20px, 2vw, 28px);
}

.logo-icon {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  transition: transform 0.25s ease;
}

.brand:hover .logo-icon,
.footer-brand:hover .logo-icon {
  transform: scale(1.08) rotate(-2deg);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.nav-link,
.mobile-link {
  opacity: 0.92;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  opacity: 1;
  color: var(--sky-100);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

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

.mobile-nav-inner {
  padding: 12px 0 18px;
  display: grid;
  gap: 8px;
}

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

.mobile-link:hover,
.mobile-link.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.page-main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  height: clamp(430px, 62vw, 620px);
  overflow: hidden;
  background: var(--gray-900);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.48) 45%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(56px, 10vw, 110px);
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--sky-600);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  padding: 6px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.tag-row span {
  padding: 3px 8px;
}

.hero-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

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

.primary-btn,
.ghost-btn,
.quick-search button,
.section-more a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.quick-search button,
.section-more a {
  color: var(--white);
  background: var(--sky-500);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.26);
}

.primary-btn:hover,
.quick-search button:hover,
.section-more a:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--sky-600);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(8px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.search-panel {
  margin-top: -32px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.search-panel p {
  margin: 0;
  color: var(--gray-600);
}

.quick-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-search input,
.card-search {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  outline: none;
  color: var(--gray-900);
  background: var(--gray-50);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.card-search:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.content-section {
  padding: 54px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-heading i {
  display: block;
  width: 80px;
  height: 4px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky-500), var(--blue-600));
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-100);
}

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

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

.card-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-mask {
  opacity: 1;
}

.card-mask span,
.play-circle {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  font-weight: 900;
}

.year-pill,
.region-pill,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.year-pill {
  top: 10px;
  right: 10px;
  padding: 4px 9px;
}

.region-pill {
  bottom: 10px;
  left: 10px;
  padding: 4px 9px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

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

.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;
}

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

.category-tile,
.overview-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.overview-card a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-stack,
.overview-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 130px;
  overflow: hidden;
  background: var(--gray-100);
}

.overview-covers {
  grid-template-columns: repeat(6, 1fr);
  height: 150px;
}

.category-stack img,
.overview-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile h3,
.overview-body h2 {
  margin: 18px 18px 8px;
  font-size: 20px;
}

.category-tile p,
.overview-body p {
  margin: 0 18px 20px;
  color: var(--gray-600);
  font-size: 14px;
}

.overview-body span {
  display: inline-flex;
  margin: 0 18px 22px;
  color: var(--sky-600);
  font-weight: 800;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(90deg, var(--sky-500), var(--blue-600));
}

.compact-hero,
.category-hero {
  padding: 54px 0;
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 5vw, 46px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

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

.filter-bar {
  margin-bottom: 24px;
  align-items: flex-start;
  flex-direction: column;
}

.sticky-filter {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 30;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--gray-200);
  font-weight: 700;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--white);
  background: var(--sky-500);
  box-shadow: none;
}

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

.movie-card-horizontal .card-link {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.movie-card-horizontal .card-poster {
  aspect-ratio: 16 / 10;
}

.movie-card-horizontal .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.movie-card-horizontal .card-body h3 {
  font-size: 20px;
}

.empty-state {
  display: none;
  padding: 48px 20px;
  border-radius: var(--radius-md);
  color: var(--gray-600);
  background: var(--white);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

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

.detail-main {
  background: var(--gray-50);
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  filter: blur(4px) scale(1.04);
  opacity: 0.48;
}

.detail-shade {
  background: linear-gradient(0deg, rgba(17, 24, 39, 1) 0%, rgba(17, 24, 39, 0.78) 54%, rgba(17, 24, 39, 0.28) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: end;
  min-height: 560px;
  padding: 72px 0 60px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

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

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.player-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.10));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover strong {
  font-size: clamp(20px, 3vw, 34px);
}

.player-text {
  padding: 22px 26px;
}

.player-text h2 {
  margin: 0 0 8px;
}

.player-text p {
  margin: 0;
  color: var(--gray-600);
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 42px;
}

.story-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: var(--gray-700);
}

.site-footer {
  margin-top: 64px;
  color: #d1d5db;
  background: var(--gray-900);
}

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

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.footer-brand .logo-icon {
  width: 30px;
  height: 30px;
  color: var(--sky-500);
}

.site-footer p {
  max-width: 420px;
  color: #9ca3af;
}

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

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

.footer-links a {
  color: #9ca3af;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--sky-500);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

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

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

  .mobile-toggle {
    display: block;
  }

  .search-panel,
  .detail-hero-inner,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    gap: 24px;
    align-items: start;
  }

  .detail-cover {
    width: min(260px, 68vw);
  }

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

@media (max-width: 720px) {
  :root {
    --header-height: 64px;
  }

  .container {
    width: min(100% - 24px, 1200px);
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-content {
    padding-bottom: 74px;
  }

  .hero-arrow {
    top: auto;
    bottom: 20px;
    width: 42px;
    height: 42px;
    font-size: 30px;
    transform: none;
  }

  .hero-arrow:hover {
    transform: scale(1.04);
  }

  .hero-prev {
    left: 14px;
  }

  .hero-next {
    right: 14px;
  }

  .hero-dots {
    bottom: 32px;
  }

  .search-panel {
    margin-top: -22px;
    padding: 22px;
  }

  .quick-search {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .movie-card-horizontal .card-link {
    grid-template-columns: 120px 1fr;
  }

  .movie-card-horizontal .card-body {
    padding: 14px;
  }

  .movie-card-horizontal .card-body h3 {
    font-size: 16px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-hero-inner {
    min-height: auto;
    padding: 36px 0 72px;
  }

  .player-section {
    margin-top: -30px;
  }

  .player-text,
  .story-card {
    padding: 20px;
  }
}

@media (max-width: 430px) {
  .brand {
    font-size: 18px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    font-size: 13px;
  }
}
