:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --accent: #2dd4bf;
  --accent-2: #14b8a6;
  --accent-dark: #0f766e;
  --danger: #f87171;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.18), transparent 30rem),
    radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.1), transparent 26rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  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(16px);
}

.header-inner {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.brand-mark {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.8rem;
  color: #042f2e;
  background: linear-gradient(135deg, var(--accent), #99f6e4);
  box-shadow: 0 12px 32px rgba(45, 212, 191, 0.25);
  font-size: 0.85rem;
}

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

.nav-link,
.mobile-nav-link {
  color: var(--muted);
  font-size: 0.96rem;
  transition: color 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 1rem;
}

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

.mobile-nav-link {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slider {
  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 {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08)),
    linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  padding: 4.5rem 0 3rem;
}

.hero-kicker,
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.83rem;
}

.hero-copy h1 {
  margin: 1rem 0 0.9rem;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #d1d5db;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
  color: var(--muted);
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: #042f2e;
  background: linear-gradient(135deg, var(--accent), #99f6e4);
  box-shadow: 0 16px 40px rgba(45, 212, 191, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5eead4, #ccfbf1);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.hero-nav {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 0.35rem;
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 1.8rem;
  background: var(--accent);
}

.main-content {
  padding: 3.5rem 0 4.5rem;
}

.page-hero {
  padding: 4.5rem 0 2.5rem;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(4, 47, 46, 0.42)),
    radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.18), transparent 24rem);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section {
  margin-bottom: 4rem;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted-2);
}

.section-more {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
}

.search-panel {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
}

.search-box span {
  color: var(--accent);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 2.5rem;
  color: #fff;
  border: 0;
  outline: none;
  background: transparent;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-chip {
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.82);
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #042f2e;
  background: var(--accent);
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 24px 70px rgba(20, 184, 166, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 46%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-badge,
.card-rank {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
}

.play-badge {
  right: 0.6rem;
  bottom: 0.6rem;
  padding: 0.24rem 0.55rem;
  color: #042f2e;
  background: var(--accent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-size: 0.78rem;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translateY(0);
}

.card-rank {
  top: 0.55rem;
  left: 0.55rem;
  min-width: 2rem;
  padding: 0.22rem 0.45rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  text-align: center;
}

.movie-card-body {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem;
}

.movie-card-body strong {
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-body em {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 0.82rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.card-tags span {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.72rem;
}

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

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 1.2rem;
}

.feature-card {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.feature-card img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.1));
}

.feature-card-content {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2rem;
}

.feature-card h2,
.feature-card h3 {
  margin: 0.7rem 0 0.55rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
}

.feature-card p {
  max-width: 680px;
  color: #d1d5db;
}

.rank-list {
  display: grid;
  gap: 0.7rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 2.7rem 4.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.86);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(45, 212, 191, 0.42);
}

.rank-index {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 999px;
  color: #042f2e;
  background: var(--accent);
  font-weight: 900;
}

.rank-item img {
  width: 4.5rem;
  height: 6.4rem;
  border-radius: 0.7rem;
  object-fit: cover;
}

.rank-item strong {
  display: block;
  overflow: hidden;
  margin-bottom: 0.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item span {
  display: block;
  color: var(--muted-2);
  font-size: 0.86rem;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(19, 78, 74, 0.48)),
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.18), transparent 12rem);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.category-card span {
  color: var(--accent);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 3rem;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.2);
  transform: scale(1.06);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.82) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
}

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

.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-2);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #99f6e4;
}

.detail-title h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-title p {
  max-width: 850px;
  margin: 0;
  color: #d1d5db;
  font-size: 1.08rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.2rem 0;
}

.detail-meta span {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.8);
}

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

.player-card,
.text-card,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  margin-bottom: 1.2rem;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-button {
  display: inline-flex;
  width: 5rem;
  height: 5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #042f2e;
  background: var(--accent);
  box-shadow: 0 24px 60px rgba(45, 212, 191, 0.28);
  font-size: 1.6rem;
  cursor: pointer;
}

.player-title {
  padding: 1rem 1.2rem 1.15rem;
}

.player-title h2 {
  margin: 0;
  font-size: 1.25rem;
}

.text-card {
  display: grid;
  gap: 1.2rem;
  padding: 1.3rem;
}

.text-card h2,
.side-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
}

.text-card p {
  margin: 0;
  color: var(--muted);
}

.side-card {
  padding: 1rem;
}

.side-list {
  display: grid;
  gap: 0.65rem;
}

.side-list .rank-item {
  grid-template-columns: 4rem minmax(0, 1fr);
}

.side-list .rank-item img {
  width: 4rem;
  height: 5.7rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tags-list a,
.tags-list span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.12);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.1fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-grid p {
  max-width: 500px;
  color: var(--muted-2);
}

.footer-grid h2 {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
  color: var(--muted-2);
}

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

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding: 1.2rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  text-align: center;
}

.empty-state {
  display: none;
  padding: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero-slider {
    height: auto;
    min-height: 640px;
  }

  .hero-copy {
    padding: 6rem 0 7rem;
  }

  .hero-controls {
    right: 1rem;
    bottom: 1rem;
  }

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

  .detail-hero-inner {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 1rem;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 1rem, 1180px);
  }

  .hero-copy h1,
  .detail-title h1 {
    letter-spacing: -0.03em;
  }

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

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

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

  .feature-card-content {
    padding: 1.2rem;
  }

  .rank-item {
    grid-template-columns: 2.3rem 4rem minmax(0, 1fr);
  }

  .rank-item img {
    width: 4rem;
    height: 5.7rem;
  }

  .detail-hero {
    padding-top: 4rem;
  }

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

  .detail-poster {
    width: 52%;
    max-width: 210px;
  }
}
