:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --teal-600: #0d9488;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 16px 42px rgba(15, 23, 42, 0.13);
  --shadow-lg: 0 28px 80px rgba(2, 6, 23, 0.26);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --header-height: 76px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-800);
  background: linear-gradient(180deg, #f8fafc 0%, #eef7f4 38%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-600));
  box-shadow: 0 14px 35px rgba(16, 185, 129, 0.36);
}

.logo-text {
  font-size: 22px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--emerald-500);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 4px;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 0 24px 20px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-link {
  display: block;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.32), transparent 34%), linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #064e3b 100%);
}

.hero-track {
  position: relative;
  min-height: 620px;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.88) 42%, rgba(15, 23, 42, 0.32) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, #f8fafc);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  align-items: center;
  gap: 54px;
  padding: 72px 0 94px;
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--emerald-100);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 22px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 26px;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.78;
}

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

.btn-primary,
.btn-ghost,
.btn-soft,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.34);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.btn-soft,
.section-more {
  color: var(--emerald-700);
  background: var(--emerald-100);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster-card {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
}

.hero-card-caption {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(14px);
}

.hero-card-caption strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.hero-card-caption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-control,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-control {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 22px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--emerald-500);
}

.main-content {
  padding: 56px 0 0;
}

.section-block {
  margin-bottom: 66px;
}

.section-block.surface {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.9), rgba(240, 253, 250, 0.84));
}

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

.section-head h2,
.page-title h1,
.detail-info h1 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--slate-600);
  line-height: 1.72;
}

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

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

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

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

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

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(145deg, var(--slate-900), var(--emerald-700));
}

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

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

.movie-card:hover .poster-frame img,
.category-card:hover img,
.related-card:hover img,
.rank-row:hover img {
  transform: scale(1.07);
}

.year-badge,
.rank-badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.year-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-height: 28px;
  padding: 0 10px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 700;
}

.movie-meta-line span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--slate-500);
}

.movie-card h2 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.32;
  font-weight: 850;
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.62;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.detail-tags span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--slate-600);
  background: var(--slate-100);
  font-size: 12px;
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.search-panel input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 0 20px;
  color: var(--slate-800);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.filter-chip {
  border: 0;
  min-height: 36px;
  padding: 0 14px;
}

.filter-chip.is-active {
  color: var(--white);
  background: var(--emerald-600);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  transition: transform 0.32s ease;
}

.category-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(180deg, transparent 12%, rgba(2, 6, 23, 0.86) 100%);
}

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

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.64;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.32), transparent 34%), linear-gradient(135deg, var(--slate-900), #064e3b);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.05em;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-badge {
  width: 52px;
  height: 52px;
  color: var(--white);
  font-size: 22px;
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
}

.rank-row img {
  width: 88px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.3s ease;
}

.rank-row h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 18px;
}

.rank-row p {
  margin: 0 0 12px;
  color: var(--slate-600);
  line-height: 1.55;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--slate-600);
  font-size: 14px;
}

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

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.detail-main,
.detail-side,
.content-card {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.detail-main {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--slate-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
  box-shadow: 0 20px 48px rgba(5, 150, 105, 0.42);
  font-size: 18px;
  font-weight: 800;
}

.play-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--emerald-700);
  background: var(--white);
}

.detail-info {
  padding: 30px;
}

.detail-info h1 {
  margin-bottom: 16px;
}

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

.detail-meta span,
.type-badge {
  min-height: 30px;
  padding: 0 11px;
  color: var(--emerald-700);
  background: var(--emerald-100);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.detail-info p,
.content-card p {
  color: var(--slate-600);
  line-height: 1.86;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-side {
  position: sticky;
  top: 100px;
  padding: 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  background: var(--slate-900);
}

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

.side-panel {
  margin-top: 18px;
}

.side-panel h2 {
  margin: 0 0 12px;
  color: var(--slate-900);
  font-size: 20px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.content-card {
  padding: 30px;
  margin-top: 24px;
}

.content-card h2 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: 26px;
}

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

.related-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--slate-50);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card h3 {
  margin: 0;
  padding: 14px;
  color: var(--slate-900);
  font-size: 16px;
}

.site-footer {
  margin-top: 80px;
  padding: 52px 0 0;
  color: rgba(255, 255, 255, 0.76);
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 32px;
}

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

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

.site-footer p {
  margin: 0;
  line-height: 1.82;
}

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

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

.site-footer a {
  transition: color 0.2s ease;
}

.site-footer a:hover,
.side-list a:hover {
  color: var(--emerald-500);
}

.footer-bottom {
  margin-top: 42px;
  padding: 20px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.58);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-list a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--slate-700);
  background: var(--slate-50);
  transition: color 0.2s ease, background 0.2s ease;
}

@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-block;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 54px 0 96px;
  }

  .hero-track,
  .hero-inner {
    min-height: 740px;
  }

  .hero-poster-card {
    max-width: 360px;
  }

  .section-head,
  .search-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .section-head {
    display: grid;
  }

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

  .rank-row {
    grid-template-columns: 46px 72px minmax(0, 1fr);
  }

  .rank-badge {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .rank-row img {
    width: 72px;
    height: 98px;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .logo-text {
    font-size: 18px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 38px;
  }

  .hero-track,
  .hero-inner {
    min-height: 720px;
  }

  .hero-controls {
    bottom: 24px;
  }

  .section-block.surface,
  .detail-info,
  .content-card {
    padding: 22px;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .rank-list,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-large .poster-frame {
    aspect-ratio: 3 / 4;
  }
}
