:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --brand: #059669;
  --brand-2: #0d9488;
  --brand-light: #d1fae5;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

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

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #064e3b, #0f766e, #111827);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  flex: 0 0 auto;
}

.brand-icon,
.footer-brand span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #0d9488);
  color: #fff;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.32);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.brand-text small {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-top: -2px;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 22px;
}

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.26), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.16));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.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: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #059669, #0d9488);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.3);
}

.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn.full {
  width: 100%;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.45);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: #10b981;
}

.quick-search {
  position: relative;
  z-index: 4;
  margin-top: -42px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips a {
  padding: 8px 14px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
}

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

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

.section-head h2,
.rank-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

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

.section-more,
.text-link,
.rank-head a {
  color: var(--brand);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

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

.poster-shadow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 62%);
}

.poster-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.poster-meta b,
.detail-labels span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
  font-size: 12px;
}

.poster-meta b:first-child,
.detail-labels span:first-child {
  background: #10b981;
}

.movie-card-body {
  padding: 18px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 700;
}

.split-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
}

.rank-panel,
.side-panel,
.detail-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.rank-panel ol,
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-row a {
  display: grid;
  grid-template-columns: 38px 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child a {
  border-bottom: 0;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #0d9488);
  font-weight: 900;
}

.rank-row img {
  width: 72px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  color: var(--muted);
}

.rank-row em {
  color: var(--brand);
  font-style: normal;
  font-weight: 800;
}

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

.category-card,
.overview-card {
  display: grid;
  gap: 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card {
  padding: 18px;
}

.category-card:hover,
.overview-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card span,
.overview-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-card img,
.overview-thumbs img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.category-card strong,
.overview-card h2 {
  font-size: 24px;
  margin: 0;
}

.category-card small,
.overview-card p {
  color: var(--muted);
}

.page-hero {
  padding: 78px 0;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.3), transparent 32%),
    linear-gradient(90deg, #059669, #0d9488);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e2f8ef;
  font-size: 18px;
}

.small-actions {
  margin-top: 22px;
}

.overview-card {
  grid-template-columns: 250px minmax(0, 1fr);
  padding: 18px;
  align-items: center;
}

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

.ranking-page .filter-panel {
  margin-bottom: 24px;
}

.large-rank {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  padding: 10px 22px;
}

.detail-main {
  padding-top: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--brand);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.detail-primary {
  display: grid;
  gap: 24px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 50% 42%, rgba(16, 185, 129, 0.22), transparent 28%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.25));
  cursor: pointer;
  text-align: center;
  padding: 24px;
}

.player-cover.hide {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.35);
  font-size: 30px;
}

.player-cover strong {
  max-width: 760px;
  font-size: clamp(22px, 4vw, 36px);
}

.detail-card {
  padding: 28px;
}

.detail-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
}

.lead-text {
  color: #334155;
  font-size: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-card h2 {
  margin: 26px 0 10px;
  font-size: 24px;
}

.detail-card p {
  color: #334155;
}

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

.detail-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 22px;
}

.side-panel h2 {
  margin: 0 0 16px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 12px;
  margin: 0 0 20px;
}

.side-panel dt {
  color: var(--muted);
}

.side-panel dd {
  margin: 0;
  font-weight: 700;
}

.related-block {
  padding-bottom: 28px;
}

.site-footer {
  margin-top: 80px;
  padding: 54px 0 28px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer p {
  color: #94a3b8;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 8px 0;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1024px) {
  .movie-grid,
  .home-grid,
  .category-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-block,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .detail-side {
    position: static;
  }

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

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

  .site-nav {
    min-height: 64px;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: #0f172a;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 12px;
  }

  .nav-cat:nth-last-child(-n + 2) {
    display: none;
  }

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

  .hero {
    height: 72vh;
    min-height: 520px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 72px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .quick-search {
    margin-top: 18px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row a {
    grid-template-columns: 32px 64px minmax(0, 1fr);
  }

  .rank-row em {
    display: none;
  }

  .detail-card,
  .side-panel {
    padding: 20px;
  }

  .detail-cover {
    aspect-ratio: 16 / 9;
  }
}
