:root {
  --page-bg: #f7faf9;
  --panel-bg: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: #d1fae5;
  --teal: #0d9488;
  --warm: #f59e0b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 36rem),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 34rem),
    var(--page-bg);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.25);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--brand), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  width: 210px;
}

.header-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.header-search span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  color: #111827;
  font-size: 22px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.mobile-panel .nav-link {
  display: block;
  margin: 4px 0;
}

.mobile-panel form {
  margin-top: 12px;
}

.mobile-panel input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}

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

.hero {
  position: relative;
  margin: 30px auto 34px;
  border-radius: 34px;
  overflow: hidden;
  min-height: 560px;
  box-shadow: var(--shadow);
  background: #0f172a;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.76fr);
  gap: 24px;
  padding: clamp(28px, 5vw, 62px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 12, 22, 0.94), rgba(7, 12, 22, 0.72) 42%, rgba(7, 12, 22, 0.24)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% -20%;
  height: 55%;
  z-index: -1;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.36), transparent 58%);
}

.hero-copy {
  align-self: center;
  max-width: 700px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(167, 243, 208, 0.36);
  border-radius: 999px;
  background: rgba(6, 78, 59, 0.36);
  color: #d1fae5;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 950;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.82;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  box-shadow: 0 16px 36px rgba(5, 150, 105, 0.32);
}

.button-light {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.hero-poster {
  align-self: center;
  justify-self: end;
  width: min(360px, 100%);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster-caption {
  padding: 18px;
  color: #ffffff;
  background: rgba(8, 13, 23, 0.78);
  backdrop-filter: blur(16px);
}

.hero-poster-caption strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
}

.hero-poster-caption span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 5vw, 62px);
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  margin: 40px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.text-link {
  color: var(--brand-dark);
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.13);
}

.poster-shell {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #065f46, #0f766e);
}

.poster-shell img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-shell img {
  transform: scale(1.06);
  filter: brightness(1.04);
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.74);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.badge-right {
  left: auto;
  right: 12px;
}

.movie-card-body {
  padding: 16px;
  display: flex;
  min-height: 178px;
  flex-direction: column;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.movie-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(236, 253, 245, 0.88)),
    radial-gradient(circle at right top, rgba(20, 184, 166, 0.18), transparent 55%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: #064e3b;
  font-size: 20px;
  font-weight: 950;
}

.category-card span {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.7;
}

.category-card em {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: rgba(5, 150, 105, 0.18);
  font-size: 54px;
  font-style: normal;
  font-weight: 950;
}

.page-hero {
  margin: 30px 0 26px;
  padding: clamp(26px, 5vw, 52px);
  border-radius: 30px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(6, 95, 70, 0.96), rgba(15, 118, 110, 0.92)),
    radial-gradient(circle at right top, rgba(255, 255, 255, 0.22), transparent 40%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.055em;
  font-weight: 950;
}

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

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.filter-input {
  flex: 1 1 260px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  font-size: 15px;
}

.filter-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-select {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  outline: none;
  color: #374151;
  font-weight: 700;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.65fr);
  gap: 26px;
  align-items: start;
}

.player-panel,
.detail-panel,
.side-panel {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

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

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.56)),
    transparent;
  cursor: pointer;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  font-size: 36px;
  line-height: 1;
  box-shadow: 0 20px 48px rgba(5, 150, 105, 0.38);
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

.play-layer:hover span {
  transform: scale(1.06);
}

.play-layer.is-hidden {
  display: none;
}

.detail-panel {
  padding: clamp(22px, 4vw, 34px);
}

.detail-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

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

.info-item {
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.info-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.info-item strong {
  display: block;
  margin-top: 5px;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.prose-block {
  margin-top: 24px;
}

.prose-block h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.prose-block p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.95;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #065f46;
  font-size: 13px;
  font-weight: 900;
}

.side-panel {
  padding: 18px;
}

.side-poster {
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #065f46, #0f766e);
}

.side-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-panel h2 {
  margin: 18px 0 12px;
  font-size: 20px;
  font-weight: 950;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
  background: #ecfdf5;
  transform: translateX(2px);
}

.related-item img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.35;
}

.related-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 94px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #ecfdf5;
  color: var(--brand-dark);
  font-weight: 950;
}

.rank-item img {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 950;
}

.rank-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  margin-top: 56px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-brand {
  color: #111827;
  font-weight: 950;
}

.search-results {
  min-height: 260px;
}

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

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

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

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

  .hero-poster {
    display: none;
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .nav-wrap {
    min-height: 66px;
  }

  .hero {
    min-height: 620px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 30px 24px 78px;
  }

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

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

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .mobile-panel,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .logo-subtitle {
    display: none;
  }

  .hero {
    margin-top: 18px;
    min-height: 600px;
  }

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

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

  .movie-card-body {
    min-height: auto;
  }

  .info-list {
    grid-template-columns: 1fr;
  }

  .toolbar {
    padding: 12px;
  }

  .filter-select {
    width: 100%;
  }
}
