:root {
  --sky: #0ea5e9;
  --sky-dark: #0284c7;
  --blue: #2563eb;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --radius: 1.25rem;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%, #f8fafc 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
}

.brand-name {
  font-size: 1.35rem;
  line-height: 1;
  background: linear-gradient(90deg, var(--sky-dark), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #0f172a;
}

.mobile-menu-button:hover {
  background: #f1f5f9;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.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-shade {
  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.12) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 0 76px;
}

.hero-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sky);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.85;
}

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

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.detail-tags a,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

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

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

.section {
  padding: 72px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin-top: 8px;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.text-link {
  color: var(--sky-dark);
  font-weight: 800;
}

.text-link:hover {
  color: var(--blue);
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-poster {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: #dbeafe;
}

.movie-card.is-compact .movie-poster {
  height: 250px;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.06) 58%, transparent);
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(0.88);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sky-dark);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 3.1em;
  margin-bottom: 8px;
  overflow: hidden;
  color: #111827;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.movie-line {
  display: -webkit-box;
  height: 3.05em;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #64748b;
  font-size: 0.78rem;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 8px;
  background: #f1f5f9;
}

.tag-list {
  margin-top: 12px;
}

.tag-list span {
  color: var(--sky-dark);
  background: #e0f2fe;
}

.band-section {
  background: linear-gradient(90deg, #f0f9ff, #eff6ff);
}

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

.rank-card a {
  display: grid;
  grid-template-columns: 46px 92px 1fr;
  gap: 14px;
  align-items: center;
  height: 100%;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fde68a, #f97316);
  color: #fff;
  font-weight: 900;
}

.rank-card img {
  width: 92px;
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-card h3 {
  margin-bottom: 6px;
  font-weight: 850;
  line-height: 1.45;
}

.rank-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(186, 230, 253, 0.7);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  border-color: #7dd3fc;
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.16rem;
  font-weight: 900;
}

.category-tile span,
.category-overview-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-card a {
  min-height: auto;
  padding: 0;
  overflow: hidden;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-copy {
  padding: 22px;
}

.category-overview-copy h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-overview-copy span {
  display: inline-flex;
  margin-top: 16px;
  color: var(--sky-dark);
  font-weight: 800;
}

.library-heading {
  align-items: center;
}

.search-box input {
  width: min(360px, 82vw);
  height: 48px;
  padding: 0 18px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.search-box input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15), var(--shadow-soft);
}

.filter-row {
  margin-bottom: 24px;
}

.filter-chip {
  border-radius: 999px;
  padding: 9px 15px;
  background: #fff;
  color: #334155;
  font-weight: 750;
  box-shadow: var(--shadow-soft);
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  background: var(--sky);
}

.empty-search {
  margin-top: 24px;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero .shell {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin: 12px 0 14px;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

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

.hero-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-inline-links a {
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 750;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
  color: #fff;
}

.detail-bg,
.detail-bg-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(12px);
  transform: scale(1.08);
  opacity: 0.48;
}

.detail-bg-mask {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 50%, rgba(2, 6, 23, 0.48) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 52px 0 64px;
}

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

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.detail-cover img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.detail-copy h1 {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 860px;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  line-height: 1.85;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-tags a {
  color: #dff6ff;
  background: rgba(14, 165, 233, 0.28);
}

.player-section {
  padding-top: 64px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.28), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sky-dark);
  font-size: 2.2rem;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.32);
}

.player-overlay strong {
  font-size: 1.2rem;
}

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

.content-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 1.45rem;
  font-weight: 900;
}

.content-card p {
  color: #475569;
  font-size: 1rem;
  line-height: 1.95;
}

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 40px;
}

.footer-brand p {
  max-width: 430px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links h2 {
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 900;
}

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

.footer-link-grid a {
  color: #64748b;
  font-size: 0.92rem;
}

.footer-link-grid a:hover {
  color: var(--sky-dark);
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid #eef2f7;
  color: #64748b;
  text-align: center;
  font-size: 0.88rem;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--sky);
  color: #fff;
  box-shadow: var(--shadow);
}

.back-to-top.is-visible {
  display: grid;
  place-items: center;
}

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

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

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

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

  .hero {
    min-height: 600px;
  }

  .hero-content {
    padding-bottom: 88px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 38px;
  }

  .section,
  .page-hero {
    padding: 54px 0;
  }

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

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

  .detail-cover {
    max-width: 310px;
  }

  .detail-hero {
    min-height: auto;
  }

  .rank-card a {
    grid-template-columns: 40px 82px 1fr;
  }

  .rank-card img {
    width: 82px;
    height: 108px;
  }

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

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }

  .brand-name {
    font-size: 1.12rem;
  }

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

  .hero h1 {
    font-size: 2.7rem;
  }

  .hero p {
    font-size: 0.98rem;
  }

  .movie-grid,
  .latest-grid,
  .library-grid,
  .rank-grid,
  .rank-list,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-poster,
  .movie-card.is-compact .movie-poster {
    height: 218px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-line,
  .tag-list {
    display: none;
  }

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

  .rank-number {
    position: absolute;
    margin: 8px;
    z-index: 2;
  }

  .rank-card a {
    position: relative;
  }

  .rank-card img {
    width: 100%;
    height: 210px;
  }

  .detail-cover img {
    height: 390px;
  }

  .player-box {
    border-radius: 18px;
  }

  .content-card {
    padding: 22px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .latest-grid,
  .library-grid,
  .rank-grid,
  .rank-list,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-poster,
  .movie-card.is-compact .movie-poster {
    height: 320px;
  }
}
