:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --card: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --green: #10b981;
  --green-dark: #059669;
  --gold: #f59e0b;
  --danger: #ef4444;
  --radius: 1.2rem;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.16), transparent 30rem),
    radial-gradient(circle at 90% 12%, rgba(245, 158, 11, 0.12), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #07111f 45%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.48), transparent);
  backdrop-filter: blur(14px);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green), #047857);
  color: #fff;
  box-shadow: 0 16px 28px rgba(16, 185, 129, 0.28);
}

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

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

.nav-link {
  color: #e2e8f0;
  font-weight: 650;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link.small {
  color: var(--muted);
  font-size: 0.88rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--green);
}

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

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

.hero-slider {
  position: relative;
  min-height: 88vh;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, #020617 0%, transparent 36%, rgba(2, 6, 23, 0.32) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 88vh;
  margin: 0 auto;
  padding: 132px 0 86px;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(16, 185, 129, 0.36);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p {
  color: #dbeafe;
  max-width: 58rem;
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.45);
}

.button.primary {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  border-color: transparent;
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.28);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.hero-dot.active {
  background: var(--green);
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(2, 6, 23, 0.64);
  color: #fff;
  cursor: pointer;
}

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

.page-main {
  padding-top: 108px;
}

.section {
  padding: 64px 0;
}

.section.compact {
  padding: 36px 0;
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-title p {
  margin: 10px 0 0;
  color: var(--muted-strong);
  max-width: 720px;
}

.search-box {
  position: relative;
  width: min(520px, 100%);
}

.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  padding: 0 18px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.search-box input:focus {
  border-color: rgba(16, 185, 129, 0.62);
}

.category-strip,
.category-grid {
  display: grid;
  gap: 16px;
}

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

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

.category-chip,
.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.52));
  padding: 20px;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.45);
}

.category-chip span,
.category-card h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 24px 70px rgba(16, 185, 129, 0.12);
}

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

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .movie-poster img {
  transform: scale(1.08);
  filter: brightness(0.88) saturate(1.08);
}

.score {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #fff;
  font-weight: 900;
  font-size: 0.86rem;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.movie-card h2 a:hover {
  color: var(--green);
}

.card-desc {
  min-height: 3.2em;
  margin: 0 0 14px;
  color: var(--muted-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  padding: 4px 9px;
  font-size: 0.78rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  padding: 14px;
}

.rank-no {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
}

.rank-item img {
  width: 150px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.rank-copy h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.rank-copy p {
  margin: 0;
  color: var(--muted-strong);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 20px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 1.48fr 0.78fr;
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.4rem;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.22));
  cursor: pointer;
  z-index: 3;
}

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

.player-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(16, 185, 129, 0.86);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 24px 48px rgba(16, 185, 129, 0.22);
}

.player-button strong {
  font-size: 2rem;
  line-height: 1;
}

.detail-card,
.text-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  padding: 22px;
  box-shadow: var(--shadow);
}

.detail-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 16px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-lead {
  color: var(--muted-strong);
  font-size: 1.08rem;
  margin: 0 0 24px;
}

.text-panel h2,
.detail-card h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.text-panel p,
.detail-card p {
  margin: 0;
  color: var(--muted-strong);
  white-space: pre-line;
}

.stack {
  display: grid;
  gap: 18px;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #fff;
}

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

.footer-grid a:hover {
  color: var(--green);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.empty-state {
  display: none;
  padding: 36px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: var(--muted);
  text-align: center;
  border-radius: var(--radius);
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 74px;
    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-links.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
  }

  .hero,
  .hero-slider,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content {
    padding: 110px 0 86px;
  }

  .hero-controls {
    bottom: 22px;
  }

  .section-head {
    display: grid;
  }

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

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

  .rank-item .button {
    grid-column: 2 / 4;
    justify-self: start;
  }

  .rank-item img {
    width: 108px;
  }

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 1.05rem;
  }

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

  .hero-arrows {
    display: none;
  }

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

  .rank-item img {
    display: none;
  }

  .rank-item .button {
    grid-column: 2;
  }

  .player-button {
    width: 96px;
    height: 96px;
  }
}
