:root {
  color-scheme: dark;
  --bg-950: #020617;
  --bg-900: #0f172a;
  --bg-850: #111c30;
  --bg-800: #1e293b;
  --bg-700: #334155;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #3b82f6;
  --orange: #f97316;
  --red: #ef4444;
  --ring: rgba(34, 211, 238, 0.48);
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg-950), var(--bg-900) 36%, var(--bg-950));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

img.is-hidden {
  opacity: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(51, 65, 85, 0.92), rgba(30, 41, 59, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark,
.footer-brand span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.28);
  font-size: 15px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 22px;
  letter-spacing: 0.08em;
}

.brand-copy small {
  color: var(--cyan);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: var(--muted);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.site-search {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 220px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.site-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 8px 10px 16px;
  color: white;
  background: transparent;
  border: 0;
  outline: 0;
}

.site-search button {
  width: 44px;
  height: 40px;
  color: var(--cyan);
  background: transparent;
  border: 0;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.mobile-panel {
  padding: 0 16px 16px;
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mobile-search {
  width: 100%;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--bg-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 1s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide::after,
.detail-hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 22% 28%, rgba(34, 211, 238, 0.22), transparent 30%), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
}

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

.hero-kicker,
.page-hero span,
.player-heading span,
.section-heading span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--cyan-deep), var(--blue));
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.25);
}

.hero-copy h1,
.detail-copy h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p,
.detail-one,
.page-hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags a,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  padding: 8px 13px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(90deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.26);
}

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

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 42px rgba(34, 211, 238, 0.24);
}

.small-btn {
  min-height: 44px;
  padding: 0 18px;
}

.hero-poster,
.detail-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.34), rgba(59, 130, 246, 0.16));
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span,
.detail-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 32px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 36px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section {
  padding: 74px 0;
}

.section-dark {
  background: var(--bg-900);
}

.section-mid {
  background: var(--bg-800);
}

.section-rank {
  background: linear-gradient(135deg, var(--bg-850), var(--bg-950));
}

.section-heading {
  text-align: center;
  margin: 0 auto 42px;
}

.section-heading span {
  margin-left: auto;
  margin-right: auto;
}

.section-heading h2,
.player-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 640px;
  margin: 12px auto 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-heading i {
  display: block;
  width: 82px;
  height: 4px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

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

.movie-card,
.wide-card,
.compact-card,
.rank-item a {
  color: white;
  background: rgba(30, 41, 59, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
}

.movie-card:hover,
.wide-card:hover,
.compact-card:hover,
.rank-item a:hover {
  transform: translateY(-6px);
  border-color: var(--ring);
  box-shadow: 0 24px 54px rgba(8, 145, 178, 0.18);
}

.poster-frame,
.wide-poster,
.compact-poster,
.rank-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.12));
}

.poster-frame {
  aspect-ratio: 2 / 3;
}

.poster-frame img,
.wide-poster img,
.compact-poster img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.movie-card:hover img,
.wide-card:hover img,
.compact-card:hover img,
.rank-item a:hover img {
  transform: scale(1.08);
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  color: var(--cyan-deep);
  background: rgba(255, 255, 255, 0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--cyan-deep), var(--blue));
  font-size: 12px;
  font-weight: 800;
}

.card-copy,
.wide-copy,
.compact-card span:last-child,
.rank-copy {
  display: grid;
  gap: 8px;
}

.card-copy {
  padding: 14px;
}

.card-copy strong,
.wide-copy strong,
.compact-card strong,
.rank-copy strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.35;
}

.card-copy em,
.wide-copy em,
.compact-card em,
.rank-copy em {
  color: var(--soft);
  font-size: 13px;
  font-style: normal;
}

.card-copy span,
.wide-copy span,
.rank-copy span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 188px;
  border-radius: 22px;
  overflow: hidden;
}

.wide-poster {
  min-height: 188px;
}

.wide-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.56), transparent);
}

.wide-copy {
  align-content: center;
  padding: 26px;
}

.wide-copy strong {
  font-size: 24px;
}

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

.category-tile {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.35), transparent 34%);
}

.category-tile:hover {
  transform: translateY(-8px);
  filter: saturate(1.08);
}

.category-tile span {
  font-size: 28px;
  font-weight: 900;
}

.category-tile strong {
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.7;
}

.category-tile em {
  width: fit-content;
  padding: 9px 14px;
  border-radius: 12px;
  color: #082f49;
  background: white;
  font-style: normal;
  font-weight: 800;
}

.rank-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 44px;
  align-items: start;
}

.rank-layout .section-heading {
  text-align: left;
  margin-left: 0;
}

.rank-layout .section-heading span,
.rank-layout .section-heading i {
  margin-left: 0;
}

.rank-list {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 86px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 126px;
  padding: 16px;
  border-radius: 22px;
}

.rank-num {
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.rank-thumb {
  width: 92px;
  height: 92px;
  border-radius: 18px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-950);
  background-size: cover;
  background-position: center;
}

.page-hero .container,
.detail-layout {
  position: relative;
  z-index: 1;
}

.page-hero {
  padding: 96px 0;
}

.compact-hero {
  background: radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.2), transparent 28%), linear-gradient(135deg, var(--bg-900), var(--bg-950));
}

.page-hero p {
  color: var(--muted);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.detail-poster {
  transform: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

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

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

.player-section {
  background: #030712;
}

.player-heading {
  margin-bottom: 22px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: black;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.46));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.3);
  font-size: 24px;
}

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

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

.movie-article,
.side-panel {
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

.movie-article {
  padding: 34px;
}

.movie-article h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.movie-article p {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.95;
}

.movie-article p:last-child {
  margin-bottom: 0;
}

.side-panel {
  padding: 28px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.side-panel dt {
  color: var(--soft);
}

.side-panel dd {
  margin: 0;
  color: white;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

.compact-poster {
  width: 82px;
  height: 110px;
  border-radius: 14px;
}

.search-status {
  margin-bottom: 22px;
  color: var(--cyan);
  font-size: 22px;
  font-weight: 800;
}

.site-footer {
  padding: 64px 0 26px;
  color: var(--muted);
  background: linear-gradient(180deg, var(--bg-900), #000);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

.footer-brand strong {
  color: white;
  font-size: 22px;
}

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

.site-footer p {
  margin: 14px 0 0;
  line-height: 1.75;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--cyan);
}

.copyright {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--soft);
  font-size: 14px;
}

.center-actions {
  justify-content: center;
  margin-top: 36px;
}

@media (max-width: 1120px) {
  .desktop-nav,
  .nav-shell > .site-search {
    display: none;
  }

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

  .hero-inner,
  .detail-layout,
  .rank-layout,
  .detail-article-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    width: min(320px, 82vw);
    margin: 0 auto;
  }

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

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

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

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

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

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 38px;
    padding-bottom: 70px;
  }

  .hero-copy h1,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero-copy p,
  .detail-one,
  .page-hero p {
    font-size: 16px;
  }

  .card-grid,
  .all-grid,
  .category-grid,
  .compact-grid,
  .full-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-card,
  .rank-item a {
    grid-template-columns: 1fr;
  }

  .rank-thumb {
    width: 100%;
    height: 180px;
  }

  .wide-poster {
    min-height: 210px;
  }

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

  .section {
    padding: 54px 0;
  }

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

@media (max-width: 460px) {
  .card-grid,
  .all-grid,
  .category-grid,
  .compact-grid,
  .full-rank {
    grid-template-columns: 1fr;
  }

  .brand-copy strong {
    font-size: 18px;
  }
}
