:root {
  color-scheme: dark;
  --bg-deep: #0f172a;
  --bg-mid: #1e293b;
  --card: rgba(15, 23, 42, 0.76);
  --card-soft: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #ef4444;
  --blue: #60a5fa;
  --purple: #a855f7;
  --pink: #ec4899;
  --gold: #facc15;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.14), transparent 34rem),
    linear-gradient(to bottom, var(--bg-deep), var(--bg-mid));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.container-custom {
  width: min(100%, 80rem);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.gradient-text {
  background-image: linear-gradient(90deg, var(--blue), var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-effect {
  border: 1px solid var(--line);
  background: var(--card-soft);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

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

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.logo-link,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #fb7185);
  box-shadow: 0 10px 26px rgba(239, 68, 68, 0.35);
}

.logo-text {
  font-size: 1.22rem;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-link {
  color: #d1d5db;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.menu-button {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 1.2rem;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: white;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 0.75rem 1rem 1rem;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 0.75rem;
}

.hero-section {
  position: relative;
  height: 60vh;
  min-height: 28rem;
  overflow: hidden;
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0f172a 4%, rgba(15, 23, 42, 0.78) 42%, rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: 4.5rem;
}

.hero-copy {
  max-width: 48rem;
}

.hero-eyebrow,
.page-kicker {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 44rem;
  margin: 0 0 1.4rem;
  color: rgba(255, 255, 255, 0.90);
  font-size: 1.08rem;
  line-height: 1.7;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.hero-tags,
.detail-meta,
.detail-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.filter-chips button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.35rem 0.78rem;
  color: rgba(255, 255, 255, 0.90);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 999px;
  padding: 0 1.25rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.35);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
  font-size: 2rem;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.15rem;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 2rem;
  background: white;
}

.intro-strip,
.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-title h2,
.content-block h2,
.player-block h2,
.side-panel h2 {
  margin: 0;
  color: #fff;
}

.intro-strip p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-space {
  margin-top: 4rem;
}

.section-heading,
.category-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title span {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
}

.section-title h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.section-more,
.category-block-heading a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.section-more:hover,
.category-block-heading a:hover {
  color: white;
}

.movie-grid,
.featured-grid {
  display: grid;
  gap: 1.35rem;
}

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

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

.movie-card,
.featured-card {
  position: relative;
  display: block;
  min-width: 0;
}

.cover-wrap,
.featured-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.28);
}

.cover-wrap {
  aspect-ratio: 16 / 9;
  margin-bottom: 0.75rem;
}

.featured-card {
  aspect-ratio: 16 / 9;
}

.cover-wrap img,
.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img,
.featured-card:hover img {
  transform: scale(1.08);
}

.cover-dim,
.featured-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 58%);
  opacity: 0.72;
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-dim,
.featured-card:hover .featured-shade {
  opacity: 0.95;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.20);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
}

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

.duration-badge {
  position: absolute;
  right: 0.55rem;
  top: 0.55rem;
  border-radius: 0.42rem;
  padding: 0.18rem 0.45rem;
  color: white;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  font-size: 0.75rem;
}

.movie-card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  color: white;
  font-weight: 700;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card-title {
  color: var(--blue);
}

.movie-meta,
.movie-line {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.25rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem;
}

.featured-content strong {
  color: #fff;
  font-size: 1.25rem;
}

.featured-content span {
  color: rgba(255, 255, 255, 0.82);
}

.search-panel {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  border-radius: var(--radius);
  padding: 0.75rem;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.85rem 1rem;
  color: white;
  outline: none;
  background: rgba(15, 23, 42, 0.86);
}

.search-panel input:focus {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

.search-panel button,
.filter-chips button {
  border: 0;
  color: white;
  cursor: pointer;
}

.search-panel button {
  border-radius: 999px;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.14);
}

.filter-chips {
  margin-bottom: 1.5rem;
}

.filter-chips button.active,
.filter-chips button:hover {
  background: rgba(239, 68, 68, 0.75);
}

.category-tile-grid,
.category-page-grid {
  display: grid;
  gap: 1rem;
}

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

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

.category-tile,
.category-card {
  display: grid;
  gap: 0.55rem;
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.15);
}

.category-tile strong,
.category-card strong {
  color: #fff;
  font-size: 1.12rem;
}

.category-tile span,
.category-card span {
  color: var(--muted);
  line-height: 1.65;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.6rem;
  object-fit: cover;
}

.home-category-block {
  margin-bottom: 3rem;
}

.category-block-heading h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: #fff;
  font-size: 1.45rem;
}

.category-block-heading h3 span {
  width: 0.28rem;
  height: 1.75rem;
  border-radius: 99px;
  background: var(--accent);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  border-radius: var(--radius);
  padding: 1rem;
}

.rank-row,
.ranking-card {
  display: grid;
  align-items: center;
  gap: 0.85rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row {
  grid-template-columns: 3rem 6.5rem 1fr;
  border-radius: 0.9rem;
  padding: 0.65rem;
}

.rank-row:hover,
.ranking-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.10);
}

.rank-number,
.ranking-index {
  color: var(--gold);
  font-weight: 900;
}

.rank-row img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.65rem;
  object-fit: cover;
}

.rank-info,
.ranking-body {
  display: grid;
  gap: 0.35rem;
}

.rank-info strong,
.ranking-body strong {
  color: #fff;
}

.rank-info small,
.ranking-body small,
.ranking-body span {
  color: var(--muted);
  line-height: 1.55;
}

.ranking-grid {
  display: grid;
  gap: 0.95rem;
}

.ranking-card {
  grid-template-columns: 3.2rem 10rem 1fr;
  border-radius: var(--radius);
  padding: 0.85rem;
}

.ranking-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  object-fit: cover;
}

.compact-hero {
  min-height: 14rem;
}

.movie-detail-hero {
  position: relative;
  min-height: 34rem;
  overflow: hidden;
}

.detail-bg,
.detail-bg-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  filter: blur(5px) saturate(1.18);
  transform: scale(1.05);
}

.detail-bg-shade {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.56));
}

.detail-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(12rem, 22rem) 1fr;
  gap: 2rem;
  align-items: end;
  min-height: 34rem;
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

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

.detail-copy h1 {
  max-width: 52rem;
}

.detail-tags {
  margin-top: 1rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 1.5rem;
  margin-top: 3rem;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.player-block,
.content-block,
.side-panel {
  border-radius: var(--radius);
  padding: 1.25rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  border-radius: 1rem;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.42));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.88);
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.42);
  font-size: 2rem;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-block p {
  margin: 1rem 0 0;
  color: #d1d5db;
  line-height: 1.9;
}

.side-panel dl {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.side-panel dt {
  color: var(--muted);
  font-size: 0.85rem;
}

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

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.62);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: var(--muted);
}

.footer-brand p {
  max-width: 36rem;
  line-height: 1.8;
}

.footer-grid h3 {
  margin: 0 0 1rem;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
  text-align: center;
  font-size: 0.85rem;
}

[data-card].hidden {
  display: none;
}

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero-section {
    height: 70vh;
  }

  .hero-arrow {
    display: none;
  }

  .intro-strip,
  .page-hero,
  .section-heading,
  .category-block-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .featured-grid,
  .category-tile-grid,
  .category-page-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 2.6rem 7rem 1fr;
  }

  .detail-hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .detail-poster {
    max-width: 18rem;
  }

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

@media (max-width: 560px) {
  .container-custom {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .hero-content {
    padding-bottom: 3.4rem;
  }

  .search-panel {
    flex-direction: column;
  }

  .search-panel button {
    min-height: 2.6rem;
  }

  .movie-grid {
    gap: 1rem;
  }

  .ranking-card,
  .rank-row {
    grid-template-columns: 2.4rem 5.8rem 1fr;
  }

  .player-block,
  .content-block,
  .side-panel {
    padding: 1rem;
  }
}
