:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-2: #1e293b;
  --card: rgba(30, 41, 59, 0.78);
  --card-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.16);
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --emerald: #10b981;
  --emerald-2: #059669;
  --teal: #0d9488;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(16, 185, 129, 0.22), transparent 32rem),
    radial-gradient(circle at 92% 12%, rgba(20, 184, 166, 0.16), transparent 30rem),
    linear-gradient(135deg, #0f172a 0%, #172033 48%, #0f172a 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

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(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 36px rgba(16, 185, 129, 0.24);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--soft);
  font-size: 14px;
}

.nav a {
  transition: color 0.2s ease;
}

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

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.8);
}

.mobile-panel {
  display: none;
  padding: 14px 0 20px;
  border-top: 1px solid var(--line);
}

.mobile-panel a {
  display: block;
  padding: 12px 4px;
  color: var(--soft);
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(13, 148, 136, 0.18));
}

.hero-bg.image-failed,
.poster-img.image-failed,
.card-cover.image-failed,
.related-cover.image-failed {
  opacity: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.28) 48%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  padding: 0 0 72px;
}

.hero-copy {
  width: min(720px, 100%);
}

.kicker,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(16, 185, 129, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  width: min(660px, 100%);
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  background: rgba(30, 41, 59, 0.82);
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.44);
}

.btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-2));
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.25);
}

.hero-dots {
  display: flex;
  gap: 9px;
  margin-top: 30px;
}

.hero-dot {
  width: 36px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

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

.section {
  padding: 58px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.76);
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.36);
  background: rgba(30, 41, 59, 0.96);
}

.cover-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.32), transparent 42%),
    linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

.cover-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 52%);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.score {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fef3c7;
  background: rgba(15, 23, 42, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0;
  min-height: 44px;
  color: white;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 750;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-line {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.category-card {
  padding: 22px;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(20, 184, 166, 0.08));
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.2);
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.38);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.rank-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.68);
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.52);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(15, 23, 42, 0.78);
}

.rank-no {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

.rank-title {
  display: block;
  margin-bottom: 4px;
  color: white;
  font-weight: 750;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.rank-heat {
  color: #34d399;
  font-weight: 850;
  white-space: nowrap;
}

.page-hero {
  padding: 54px 0 34px;
}

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

.breadcrumb a {
  color: #34d399;
}

.page-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-desc {
  width: min(760px, 100%);
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 12px;
  padding: 16px;
  margin-bottom: 26px;
}

.search-box input,
.search-box select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.76);
  padding: 0 16px;
  outline: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.92fr);
  gap: 28px;
  align-items: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 20px 56px rgba(16, 185, 129, 0.36);
  font-size: 30px;
  transform: translateX(2px);
}

.movie-info {
  padding: 24px;
  margin-top: 22px;
}

.movie-info h1 {
  margin: 14px 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.info-cell {
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
}

.info-label {
  color: var(--muted);
  font-size: 12px;
}

.info-value {
  margin-top: 4px;
  color: white;
  font-weight: 700;
}

.article-block {
  padding: 24px;
  margin-top: 22px;
}

.article-block h2,
.related-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.article-block p {
  margin: 0 0 16px;
  color: #d1d5db;
  line-height: 1.9;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.14);
  font-size: 13px;
}

.related-panel {
  position: sticky;
  top: 88px;
  padding: 20px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.52);
}

.related-img-wrap {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.related-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card h3 {
  margin: 4px 0 6px;
  font-size: 14px;
  line-height: 1.45;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 26px;
  padding: 36px 0;
}

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

.footer p,
.footer a {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.footer a {
  display: block;
  margin: 6px 0;
}

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

.copyright {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

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

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

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

  .related-panel {
    position: static;
  }
}

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

  .menu-btn {
    display: block;
  }

  .mobile-panel.open {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

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

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

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

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

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

  .rank-item {
    grid-template-columns: 34px 1fr;
  }

  .rank-heat {
    grid-column: 2;
  }

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

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

  .logo span:last-child {
    font-size: 17px;
  }
}
