:root {
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --slate: #0f172a;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 16px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.nav-shell {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.1);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

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

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  padding: 8px 20px 18px;
  background: rgba(15, 118, 110, 0.96);
  backdrop-filter: blur(10px);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.hero-slider {
  position: relative;
  height: 540px;
  min-height: 78vh;
  overflow: hidden;
  background: var(--slate);
}

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.active img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.22) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 74px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.hero-content p {
  max-width: 780px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 21px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

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

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, transform 0.25s ease;
}

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

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.main-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 72px;
}

.section-stack {
  display: grid;
  gap: 62px;
}

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

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--teal);
  font-weight: 800;
  white-space: nowrap;
}

.feature-panel {
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(90deg, #ecfeff, #eff6ff);
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.08);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

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

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

.movie-card:hover img,
.rank-card:hover img,
.category-tile:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent 45%);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover {
  color: var(--teal);
}

.card-meta {
  margin: 8px 0 7px;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #475569;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: #0f766e;
  background: #ccfbf1;
}

.tag-row.compact span {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 11px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  background: var(--slate);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.category-tile img {
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.5s ease;
}

.category-tile-content {
  position: absolute;
  inset: auto 18px 18px 18px;
}

.category-tile h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.category-tile p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 24px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: -90px -90px auto auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
}

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

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0f766e;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font: inherit;
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.filter-pill.active,
.filter-pill:hover {
  color: #ffffff;
  border-color: var(--teal);
  background: var(--teal);
}

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

.rank-card {
  display: grid;
  grid-template-columns: auto 94px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 900;
}

.rank-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-content p {
  margin: 6px 0 10px;
  color: #475569;
}

.rank-title {
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--teal);
  font-weight: 800;
}

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

.detail-main,
.detail-side,
.text-panel {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
}

.detail-main {
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18));
  cursor: pointer;
}

.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-button-core {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease;
}

.play-overlay:hover .play-button-core {
  transform: scale(1.08);
}

.detail-info {
  padding: 26px;
}

.detail-info h1 {
  margin: 0 0 12px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.detail-info .lead {
  margin: 0 0 20px;
  color: #475569;
  font-size: 18px;
}

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

.meta-grid div {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
}

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

.meta-grid strong {
  display: block;
  margin-top: 2px;
  color: #111827;
}

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

.text-panel h2,
.detail-side h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 22px;
}

.text-panel p {
  margin: 0;
  color: #334155;
}

.text-panel p + h2 {
  margin-top: 24px;
}

.detail-side {
  padding: 18px;
}

.cover-card {
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

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

.side-link {
  display: block;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  text-align: center;
  font-weight: 900;
}

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

.related-card {
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.related-card img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card span {
  display: block;
  padding: 12px;
  color: #111827;
  font-weight: 800;
}

.no-results {
  display: none;
  padding: 34px;
  border-radius: 18px;
  color: #64748b;
  background: #ffffff;
  text-align: center;
  font-weight: 800;
}

.no-results.show {
  display: block;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 28px;
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid p {
  margin: 0;
}

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

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

.footer-grid a:hover {
  color: #5eead4;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.back-top {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #ffffff;
  background: var(--teal);
  cursor: pointer;
  font-weight: 800;
}

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

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

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

  .detail-side {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .nav-shell {
    padding: 0 16px;
  }

  .hero-slider {
    height: 560px;
    min-height: 72vh;
  }

  .hero-content {
    bottom: 68px;
  }

  .hero-control {
    display: none;
  }

  .main-shell {
    padding: 36px 16px 54px;
  }

  .section-head {
    display: block;
  }

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

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

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

  .rank-card {
    grid-template-columns: 46px 78px 1fr;
    gap: 12px;
  }

  .rank-title {
    font-size: 17px;
  }

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .mobile-nav.open {
    grid-template-columns: 1fr;
  }

  .hero-slider {
    height: 520px;
  }

  .hero-content p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .feature-panel {
    padding: 20px;
  }

  .rank-card {
    grid-template-columns: 40px 72px 1fr;
    padding: 10px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 13px;
  }

  .rank-content p,
  .rank-meta,
  .rank-content .tag-row {
    display: none;
  }

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