:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.16);
  --amber: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

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

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #22d3ee);
  color: white;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.28);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  position: relative;
  color: #e2e8f0;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--emerald);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: white;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: white;
}

.nav-categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 0 12px;
  scrollbar-width: none;
}

.nav-categories::-webkit-scrollbar {
  display: none;
}

.nav-categories a {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.nav-categories a:hover {
  border-color: rgba(16, 185, 129, 0.58);
  color: #d1fae5;
  background: var(--emerald-soft);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  height: min(86vh, 820px);
  min-height: 620px;
  background: #020617;
}

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

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

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

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 43%, rgba(2, 6, 23, 0.14) 100%),
    linear-gradient(0deg, #020617 0%, transparent 38%);
}

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

.hero-copy {
  width: min(700px, 100%);
  padding-top: 70px;
}

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a7f3d0;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0;
  color: white;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 7vw, 6rem);
}

.hero-copy h2 {
  font-size: clamp(1.6rem, 3.5vw, 3.2rem);
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}

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

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #d1fae5;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
}

.tag-row span {
  padding: 5px 9px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.28);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.48);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #34d399;
}

.hero-strip {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: -104px;
}

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.58);
}

.compact-card img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-num {
  position: absolute;
  top: -10px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  font-size: 0.75rem;
  font-weight: 900;
}

.compact-title,
.compact-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-title {
  color: white;
  font-weight: 800;
}

.compact-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.main-stack,
.page-main {
  padding: 58px 0 86px;
}

.content-section,
.category-panel,
.rank-panel,
.rank-list-section {
  margin-top: 62px;
}

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

.section-head h2,
.category-title-link h2,
.text-panel h2 {
  margin: 8px 0;
  color: white;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: -0.045em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: #a7f3d0;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: var(--shadow);
}

.poster-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.25s ease;
}

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

.poster-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 52%);
}

.movie-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.badge-left {
  left: 12px;
  background: rgba(2, 6, 23, 0.64);
}

.badge-right {
  right: 12px;
  background: rgba(245, 158, 11, 0.9);
}

.play-ring {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.92);
  color: white;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: all 0.22s ease;
}

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

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

.movie-card-body h2,
.movie-card-body h3 {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 0 0 10px;
  overflow: hidden;
  color: white;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 14px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.62;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #94a3b8;
  font-size: 0.86rem;
}

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

.category-card,
.category-overview-card,
.text-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 24px;
}

.category-main,
.category-title-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: white;
  font-weight: 900;
  font-size: 1.28rem;
}

.category-main strong,
.category-title-link span {
  color: #a7f3d0;
  font-size: 0.92rem;
}

.category-card p,
.category-overview-card p,
.text-panel p {
  color: #cbd5e1;
  line-height: 1.8;
}

.category-card div,
.footer-links,
.category-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-card div a,
.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.72);
  color: #cbd5e1;
  font-size: 0.88rem;
}

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

.page-hero {
  padding: 72px 0 28px;
}

.compact-page-hero {
  padding-bottom: 48px;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #94a3b8;
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #34d399;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 46px;
}

.page-link,
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  font-weight: 800;
}

.page-link:hover,
.page-link.is-current {
  border-color: rgba(16, 185, 129, 0.64);
  background: var(--emerald);
  color: white;
}

.detail-main {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.62;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.02);
}

.detail-shell {
  position: relative;
  z-index: 2;
  padding-top: 118px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

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

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

.detail-info h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.detail-meta-grid dt {
  color: #94a3b8;
  font-size: 0.82rem;
}

.detail-meta-grid dd {
  margin: 6px 0 0;
  color: white;
  font-weight: 800;
}

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

.player-section {
  margin-top: -80px;
  position: relative;
  z-index: 3;
}

.video-frame {
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
}

.media-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 54px;
}

.rank-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.rank-row {
  display: grid;
  grid-template-columns: 64px 68px minmax(0, 1fr) minmax(180px, auto) 88px;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

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

.rank-row:hover {
  background: rgba(16, 185, 129, 0.08);
}

.rank-row-number {
  color: #fbbf24;
  font-size: 1.2rem;
  font-weight: 900;
}

.rank-row img {
  width: 68px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row-title {
  overflow: hidden;
  color: white;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row-meta {
  color: #94a3b8;
}

.rank-row-score {
  color: #a7f3d0;
  font-weight: 900;
  text-align: right;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(760px, 100%);
  margin-top: 26px;
}

.search-box input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  color: white;
  padding: 0 18px;
  font-size: 1rem;
  outline: none;
}

.search-box input:focus {
  border-color: rgba(16, 185, 129, 0.75);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.search-box button {
  height: 54px;
  border: 0;
  border-radius: 18px;
  background: var(--emerald);
  color: white;
  padding: 0 22px;
  font-weight: 900;
  cursor: pointer;
}

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

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

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

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

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

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

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

  .detail-poster {
    width: min(360px, 100%);
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 12px;
  }

  .hero-stage {
    height: 760px;
    min-height: 720px;
  }

  .hero-shade,
  .detail-shade {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.84) 62%, rgba(2, 6, 23, 0.38) 100%);
  }

  .hero-control {
    display: none;
  }

  .hero-dots {
    bottom: 172px;
  }

  .hero-strip,
  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 42px 56px minmax(0, 1fr);
  }

  .rank-row-meta,
  .rank-row-score {
    display: none;
  }

  .search-box {
    grid-template-columns: 1fr;
  }
}

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

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.045em;
  }

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

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