:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --emerald: #34d399;
  --emerald-strong: #10b981;
  --teal: #14b8a6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.16), transparent 30%),
    radial-gradient(circle at 88% 6%, rgba(20, 184, 166, 0.12), transparent 24%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald-strong), var(--teal));
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.26);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--emerald), #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted-2);
}

.desktop-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  justify-content: center;
}

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

.hero-track,
.hero-slide,
.hero-slide > img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.02);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.48) 48%, rgba(2, 6, 23, 0.14) 100%);
}

.hero-content {
  position: relative;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 40px;
  padding-top: 110px;
  padding-bottom: 84px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--emerald);
  font-size: 14px;
  letter-spacing: 0.08em;
}

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

.hero p,
.page-hero p,
.detail-line {
  margin: 18px 0 0;
  max-width: 720px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.85;
}

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

.hero-tags {
  margin-top: 22px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn.primary {
  color: #04111d;
  background: linear-gradient(135deg, var(--emerald), #5eead4);
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.22);
}

.btn.ghost {
  color: #d1fae5;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(15, 23, 42, 0.58);
}

.btn:hover,
.category-tile:hover,
.movie-card:hover,
.overview-card:hover,
.rank-card:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.active {
  width: 28px;
  background: var(--emerald);
}

.section-block {
  padding: 58px 0;
}

.section-band {
  background: rgba(15, 23, 42, 0.42);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--emerald);
  font-weight: 700;
  white-space: nowrap;
}

.search-panel {
  margin-top: -32px;
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel.inline-search {
  margin-top: 28px;
}

.search-panel h2 {
  margin: 0 0 6px;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
}

.search-bar input,
.search-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  padding: 0 14px;
}

.search-bar input:focus,
.search-bar select:focus {
  border-color: rgba(52, 211, 153, 0.56);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

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

.category-tile,
.overview-card,
.movie-card,
.rank-card,
.player-card,
.detail-text article {
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
  transition: 0.2s ease;
}

.category-tile {
  min-height: 132px;
  padding: 18px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-tile span {
  font-size: 19px;
  font-weight: 800;
}

.category-tile small {
  color: var(--muted);
  line-height: 1.6;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: 0.35s ease;
}

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

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.poster-year {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  font-size: 12px;
}

.poster-play {
  left: 50%;
  bottom: 12px;
  padding: 7px 12px;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: 0.25s ease;
}

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

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #f8fafc;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-info a:hover,
.breadcrumb a:hover {
  color: var(--emerald);
}

.card-meta {
  margin: 9px 0;
  color: var(--muted-2);
  font-size: 12px;
}

.card-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.52);
}

.card-body p {
  display: -webkit-box;
  margin: 0 0 12px;
  min-height: 42px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.wide {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

.movie-card.wide .poster img {
  height: 100%;
}

.page-hero {
  position: relative;
  padding: 96px 0 46px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
}

.compact-page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

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

.overview-card {
  overflow: hidden;
  border-radius: 24px;
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 172px;
  background: #0f172a;
}

.overview-cover img {
  width: 100%;
  height: 172px;
  object-fit: cover;
}

.overview-body {
  padding: 18px;
}

.overview-body h2 {
  margin: 0;
}

.overview-body p {
  color: var(--muted);
  line-height: 1.75;
}

.overview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-2);
}

.overview-meta a {
  color: var(--emerald);
  font-weight: 700;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 74px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
}

.rank-num {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #022c22;
  background: linear-gradient(135deg, var(--emerald), #5eead4);
  font-weight: 900;
}

.rank-cover img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.65;
}

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

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

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.48;
}

.detail-mask {
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.86) 42%, rgba(2, 6, 23, 0.55) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.24) 100%);
}

.detail-wrap {
  position: relative;
  padding: 34px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

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

.detail-meta {
  margin: 18px 0;
  color: #cbd5e1;
}

.large-tags {
  margin-top: 18px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
}

.site-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.big-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.big-play span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #022c22;
  background: linear-gradient(135deg, var(--emerald), #5eead4);
  font-size: 30px;
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.26);
}

.big-play strong {
  font-size: 18px;
}

.player-card.is-playing .big-play {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 13px;
}

.detail-text article {
  padding: 26px;
  border-radius: 24px;
}

.detail-text h2 {
  margin: 0 0 12px;
}

.detail-text p {
  margin: 0 0 20px;
  color: #cbd5e1;
  line-height: 1.95;
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.84);
  padding: 46px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 10px;
  color: var(--emerald);
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .category-grid,
  .all-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: flex;
  }

  .hero-content,
  .detail-grid,
  .search-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

  .movie-card.wide {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 260px;
  }
}

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

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text em {
    display: none;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p,
  .detail-line {
    font-size: 15px;
  }

  .search-bar,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .overview-grid,
  .all-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-cover img {
    width: 100%;
    max-width: 180px;
  }
}
