:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --bg-soft: #111827;
  --card: rgba(15, 23, 42, 0.82);
  --card-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #10b981;
  --teal: #14b8a6;
  --yellow: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34rem),
    linear-gradient(135deg, #0f172a 0%, #111827 45%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  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: 100;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.28);
}

.brand-text {
  font-size: 1.32rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

.header-search {
  position: relative;
}

.header-search input {
  width: 220px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 10px 16px;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-form-wide input:focus {
  border-color: rgba(16, 185, 129, 0.78);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.68);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: currentColor;
}

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

.hero-track,
.hero-slide {
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.8)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.98)),
    radial-gradient(circle at 78% 18%, rgba(16, 185, 129, 0.22), transparent 25rem);
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.58fr);
  align-items: end;
  gap: 54px;
  padding: 110px 0 82px;
}

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

.eyebrow {
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: white;
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-one-line,
.search-card p,
.section-head p,
.category-tile p,
.detail-content p,
.site-footer p {
  color: var(--muted-strong);
}

.hero-summary {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: 1.12rem;
}

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

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

.hero-tags span,
.tag-row span {
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.large-tags span {
  font-size: 0.86rem;
  padding: 7px 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.search-form-wide button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.search-form-wide button {
  color: white;
  border: 0;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 16px 34px rgba(20, 184, 166, 0.25);
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form-wide button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.25);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  transform: translateY(12px);
}

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

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

.hero-dots button {
  width: 36px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dots button.active {
  background: #34d399;
}

.section-block,
.home-search {
  padding: 72px 0;
}

.search-card,
.filter-panel,
.category-overview-card a,
.detail-content article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: center;
  padding: 30px;
}

.search-card h2,
.section-head h2,
.detail-content h2,
.player-section h2,
.category-overview-card h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}

.search-form-wide {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-form-wide input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.56);
  padding: 13px 15px;
}

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

.section-head p {
  margin: 8px 0 0;
}

.text-link {
  color: #34d399;
  font-weight: 800;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(20, 184, 166, 0.04)),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.5);
}

.category-tile span,
.category-name {
  color: white;
  font-size: 1.16rem;
  font-weight: 850;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
}

.rank-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-deep);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 5px 9px;
}

.year-badge {
  right: 12px;
  color: #d1fae5;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.rank-badge {
  left: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--yellow));
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-meta a {
  color: #34d399;
}

.movie-card h2 {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 9px 0 8px;
  overflow: hidden;
  color: white;
  font-size: 1.04rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.9em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.compact .card-body {
  padding: 14px;
}

.page-hero,
.detail-hero {
  position: relative;
  padding: 88px 0 56px;
  background:
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.2), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.16));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero p {
  max-width: 760px;
  font-size: 1.06rem;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #34d399;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 22px;
}

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

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 0.88rem;
}

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

.category-overview-card a {
  display: grid;
  gap: 12px;
  min-height: 230px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-card strong {
  color: #d1fae5;
  font-weight: 650;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

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

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

.detail-one-line {
  max-width: 860px;
  margin: 22px 0;
  font-size: 1.14rem;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(15, 23, 42, 0.64);
}

.player-section {
  padding: 72px 0 36px;
}

.in-player {
  margin-bottom: 18px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  text-align: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.28);
  font-size: 1.6rem;
}

.play-title {
  color: #bbf7d0;
  font-weight: 850;
}

.play-overlay strong {
  max-width: min(720px, 82%);
  font-size: clamp(1.4rem, 4vw, 2.8rem);
  line-height: 1.12;
}

.detail-content {
  display: grid;
  gap: 20px;
  padding: 30px 0;
}

.detail-content article {
  padding: 28px;
}

.detail-content p {
  margin: 12px 0 0;
  font-size: 1.04rem;
}

.related-section {
  padding-top: 42px;
}

.site-footer {
  margin-top: 52px;
  padding: 48px 0 28px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.5);
}

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

.footer-brand {
  color: white;
  font-size: 1.18rem;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

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

.site-footer a {
  color: var(--muted-strong);
}

.site-footer a:hover {
  color: #34d399;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

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

@media (max-width: 980px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .header-search input {
    width: 100%;
  }

  .hero-layout,
  .detail-grid,
  .search-card {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    align-items: center;
    padding-top: 86px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .brand-text {
    font-size: 1.05rem;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide,
  .hero-layout {
    min-height: 590px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.26rem;
  }

  .hero-actions,
  .search-form-wide {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-btn,
  .ghost-btn,
  .search-form-wide button {
    width: 100%;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .category-grid,
  .category-overview-grid,
  .filter-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .card-body {
    padding: 12px;
  }

  .movie-card h2 {
    font-size: 0.96rem;
  }

  .movie-card p {
    font-size: 0.84rem;
  }

  .detail-content article {
    padding: 22px;
  }
}
