:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #10b981;
  --brand-two: #06b6d4;
  --brand-three: #8b5cf6;
  --danger: #f43f5e;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.20), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(6, 182, 212, 0.18), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.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.78);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
  color: #001b15;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

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

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 8px 10px;
}

.header-search button,
.menu-toggle,
.primary-button,
.secondary-button,
.play-button,
.filter-chip {
  border: 0;
  cursor: pointer;
}

.header-search button {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 13px;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
  color: #02120e;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 44px 0 52px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  min-height: 560px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 34px;
  align-items: center;
  padding: 54px;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-slide::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(2, 6, 23, 0.26) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.05);
}

.hero-slide::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 18% 22%, rgba(16, 185, 129, 0.28), transparent 26rem),
    radial-gradient(circle at 70% 20%, rgba(6, 182, 212, 0.22), transparent 28rem),
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.12);
  font-size: 14px;
  font-weight: 800;
}

.hero-title {
  max-width: 780px;
  margin: 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 690px;
  margin: 22px 0 0;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.movie-meta,
.card-meta,
.rank-meta,
.detail-meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

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

.pill,
.tag,
.tiny-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
}

.pill {
  padding: 7px 11px;
  font-size: 14px;
}

.tag,
.tiny-pill {
  padding: 5px 9px;
  font-size: 12px;
}

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

.primary-button,
.secondary-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 0 22px;
  color: #001b15;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.24);
}

.secondary-button {
  padding: 0 20px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.secondary-button:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  overflow: hidden;
  align-self: stretch;
  min-height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(6, 182, 212, 0.16)),
    #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.hero-poster img,
.poster-frame img,
.detail-poster img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster img.is-missing,
.poster-frame img.is-missing,
.detail-poster img.is-missing,
.rank-poster img.is-missing {
  opacity: 0;
}

.hero-dots {
  position: absolute;
  left: 54px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
}

.section {
  padding: 38px 0;
}

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

.section-kicker {
  margin-bottom: 9px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.section-desc {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(15, 23, 42, 0.95);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.23), rgba(139, 92, 246, 0.16)),
    #111827;
}

.poster-frame::after {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  content: "";
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), transparent);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.68);
  color: #d1fae5;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-summary {
  display: -webkit-box;
  min-height: 66px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #cbd5e1;
  font-size: 12px;
}

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

.category-card {
  min-height: 178px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 88% 0%, rgba(16, 185, 129, 0.20), transparent 12rem),
    rgba(15, 23, 42, 0.75);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.44);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  color: #fff;
  font-size: 21px;
  font-weight: 950;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-no {
  font-size: 28px;
  font-weight: 950;
  color: #67e8f9;
  text-align: center;
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(6, 182, 212, 0.16));
}

.rank-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.rank-desc {
  display: -webkit-box;
  max-width: 800px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  padding: 58px 0 26px;
}

.page-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 10%, rgba(6, 182, 212, 0.16), transparent 20rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #fff;
}

.page-card h1,
.detail-title {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

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

.player-card,
.info-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

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

.video-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.68)),
    var(--poster-image) center / cover no-repeat;
  cursor: pointer;
}

.video-cover.hidden {
  display: none;
}

.play-ring {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
  color: #001b15;
  font-size: 34px;
  font-weight: 950;
  box-shadow: 0 24px 60px rgba(16, 185, 129, 0.34);
}

.player-body,
.info-card,
.side-card {
  padding: 22px;
}

.info-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.info-card p,
.side-card p {
  color: var(--soft);
  line-height: 1.85;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(6, 182, 212, 0.14));
}

.side-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.side-link {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.side-link img {
  width: 56px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.13));
}

.side-link strong {
  display: block;
  color: #fff;
  line-height: 1.35;
}

.side-link span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

.filter-chip {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.05);
}

.filter-chip.active,
.filter-chip:hover {
  color: #001b15;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a:hover {
  color: #fff;
}

@media (max-width: 1080px) {
  .header-search {
    min-width: 210px;
  }

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

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links,
  .header-search {
    position: fixed;
    left: 16px;
    right: 16px;
    display: none;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-links {
    top: 76px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
  }

  .nav-links a {
    border-radius: 14px;
  }

  .header-search {
    top: 326px;
    min-width: 0;
    border-radius: 22px;
  }

  body.menu-open .nav-links,
  body.menu-open .header-search {
    display: flex;
  }

  .hero {
    min-height: 540px;
    padding-top: 24px;
  }

  .hero-shell {
    min-height: 520px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 34px 24px;
  }

  .hero-dots {
    left: 24px;
    bottom: 22px;
  }

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

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

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

  .rank-item .primary-button {
    grid-column: 1 / -1;
  }
}

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

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-title,
  .page-card h1,
  .detail-title {
    letter-spacing: -0.035em;
  }

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

  .page-card {
    padding: 24px;
  }
}
