:root {
  --color-primary: #0891b2;
  --color-primary-dark: #0e7490;
  --color-blue: #2563eb;
  --color-teal: #0d9488;
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-500: #64748b;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 25px 60px rgba(15, 23, 42, 0.22);
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-slate-800);
  background: linear-gradient(180deg, var(--color-slate-50), var(--color-slate-100));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-blue), var(--color-primary), var(--color-teal));
  box-shadow: 0 14px 35px rgba(14, 116, 144, 0.25);
}

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

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

.brand-name {
  font-size: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--color-primary);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: rotate(12deg) scale(1.04);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #dffafe;
}

.mobile-menu-button {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-carousel {
  position: relative;
  min-height: 440px;
  height: 60vh;
  overflow: hidden;
  background: var(--color-slate-900);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(650px, 100%);
  color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 5px 12px;
  color: #ffffff;
  background: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
}

.section-label {
  margin-bottom: 8px;
  color: var(--color-primary-dark);
  background: rgba(8, 145, 178, 0.12);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 14px 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h1 + h2 {
  margin-top: 0;
  color: #e0f2fe;
  font-size: clamp(30px, 4vw, 48px);
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: 18px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.35);
}

.primary-button:hover,
.text-button:hover {
  transform: translateY(-2px);
  background: var(--color-primary-dark);
}

.ghost-button {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.ghost-button.dark {
  color: var(--color-slate-800);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.3s ease, background 0.3s ease;
}

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

.search-band {
  position: relative;
  z-index: 20;
  margin-top: -38px;
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(16px);
}

.search-band h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.detail-aside h2 {
  margin: 0;
  color: var(--color-slate-900);
  letter-spacing: -0.03em;
}

.search-band h2 {
  font-size: 24px;
}

.search-band p,
.page-hero p {
  margin: 6px 0 0;
  color: var(--color-slate-500);
}

.site-search {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.site-search-input,
.page-filter input {
  width: 100%;
  border: 1px solid var(--color-slate-200);
  border-radius: 14px;
  padding: 13px 15px;
  color: var(--color-slate-800);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input:focus,
.page-filter input:focus {
  border-color: rgba(8, 145, 178, 0.7);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.site-search button {
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--color-primary);
  font-weight: 800;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  display: none;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--color-slate-200);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-strong);
}

.search-results.is-open {
  display: grid;
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--color-slate-100);
}

.search-result-item:hover {
  background: var(--color-slate-50);
}

.search-result-item img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-slate-200);
}

.search-result-item strong {
  display: block;
  color: var(--color-slate-900);
}

.search-result-item span {
  color: var(--color-slate-500);
  font-size: 13px;
}

.section {
  padding: 70px 0;
}

.soft-section {
  background: rgba(255, 255, 255, 0.55);
}

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

.section-heading h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.section-link,
.text-button {
  color: var(--color-primary-dark);
  font-weight: 800;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.18);
}

.poster-box {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--color-slate-200);
}

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

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

.poster-box::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.75));
  transition: opacity 0.3s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  right: 10px;
  padding: 4px 8px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
}

.card-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.94);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.74);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

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

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

.movie-card p {
  display: -webkit-box;
  min-height: 40px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--color-slate-500);
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--color-slate-500);
  font-size: 12px;
}

.card-meta span:first-child {
  color: var(--color-primary-dark);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--color-slate-900);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-tile::before,
.category-overview-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(13, 148, 136, 0.16));
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.category-tile span,
.category-overview-card h2 {
  position: relative;
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  position: relative;
  margin: 0;
  color: var(--color-slate-500);
}

.category-overview-card {
  display: grid;
  gap: 12px;
}

.mini-links {
  position: relative;
  display: grid;
  gap: 7px;
}

.mini-links a {
  color: var(--color-slate-700);
  font-size: 14px;
}

.mini-links a:hover {
  color: var(--color-primary-dark);
}

.ranking-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(8, 145, 178, 0.08));
}

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

.compact-card {
  display: grid;
  grid-template-columns: 92px 1fr;
}

.compact-card .poster-box {
  aspect-ratio: auto;
  height: 132px;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0;
  background: radial-gradient(circle at 15% 20%, rgba(45, 212, 191, 0.22), transparent 30%), linear-gradient(135deg, #0f172a, #164e63 48%, #0f766e);
  color: #ffffff;
}

.page-hero-inner {
  max-width: 760px;
}

.page-hero h1 {
  margin: 10px 0 10px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  color: #dbeafe;
  font-size: 18px;
}

.page-hero .site-search {
  margin-top: 24px;
  max-width: 560px;
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

.category-page-hero .page-filter {
  max-width: 560px;
  margin-top: 24px;
}

.empty-filter {
  display: none;
  margin: 24px 0 0;
  color: var(--color-slate-500);
  text-align: center;
}

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

.detail-hero {
  padding: 64px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-slate-200);
  box-shadow: var(--shadow-strong);
}

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

.detail-info h1 {
  margin: 14px 0 14px;
  color: #ffffff;
  font-size: clamp(32px, 4.8vw, 54px);
  line-height: 1.12;
}

.detail-lead {
  max-width: 780px;
  margin: 0 0 20px;
  color: #e2e8f0;
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.detail-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  padding: 46px 0 12px;
  background: var(--color-slate-900);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow-strong);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  filter: blur(1px);
}

.player-cover span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: var(--color-primary-dark);
  background: rgba(255, 255, 255, 0.94);
  font-size: 36px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
}

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

.detail-content-section {
  background: #ffffff;
}

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

.detail-article,
.detail-aside {
  border-radius: var(--radius-lg);
  background: var(--color-slate-50);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.detail-article {
  padding: 32px;
}

.detail-article h2,
.detail-aside h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 28px;
  color: var(--color-slate-700);
  font-size: 17px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.info-list div {
  border: 1px solid var(--color-slate-200);
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
}

.info-list dt {
  color: var(--color-slate-500);
  font-size: 13px;
}

.info-list dd {
  margin: 4px 0 0;
  color: var(--color-slate-900);
  font-weight: 800;
}

.detail-aside {
  padding: 24px;
}

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

.related-list .compact-card {
  grid-template-columns: 82px 1fr;
}

.related-list .compact-card .poster-box {
  height: 118px;
}

.site-footer {
  color: #ffffff;
  background: linear-gradient(180deg, var(--color-slate-800), var(--color-slate-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 20px;
}

.footer-brand .brand-mark {
  color: #ffffff;
  background: var(--color-primary);
}

.site-footer p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 17px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
  font-size: 14px;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 18px 0;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .hero-carousel {
    height: 68vh;
  }

  .hero-control {
    display: none;
  }

  .search-band {
    margin-top: 0;
    padding: 18px 0 0;
    background: var(--color-slate-100);
  }

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

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

  .detail-poster {
    width: min(300px, 80vw);
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

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

  .hero-overlay {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.9));
  }

  .hero-content {
    align-items: end;
    padding-bottom: 76px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .site-search {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

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

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

  .ranking-strip,
  .category-grid,
  .category-overview-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .compact-card,
  .related-list .compact-card {
    grid-template-columns: 78px 1fr;
  }

  .compact-card .poster-box,
  .related-list .compact-card .poster-box {
    height: 112px;
  }

  .page-hero,
  .detail-hero {
    padding: 48px 0;
  }

  .detail-article,
  .detail-aside {
    padding: 22px;
  }

  .player-cover span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
