:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #14b8a6;
  --brand-dark: #0f766e;
  --brand-soft: rgba(20, 184, 166, 0.12);
  --dark: #020617;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  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;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.42);
  font-size: 14px;
}

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.18);
}

.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
}

.mobile-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: rgba(2, 6, 23, 0.98);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

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

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

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

.hero-cover,
.hero-cover img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.02);
}

.hero-overlay {
  background:
    radial-gradient(circle at 70% 35%, rgba(20, 184, 166, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12) 0%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-content {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(760px, 100%);
  padding: 80px 0 110px;
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #5eead4;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 18px 0 0;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.08;
  font-weight: 900;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.side-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.10);
  color: #ecfeff;
  font-size: 13px;
  font-weight: 800;
}

.tag-row span,
.detail-meta span {
  background: rgba(20, 184, 166, 0.10);
  color: var(--brand-dark);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  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, #14b8a6, #06b6d4);
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(20, 184, 166, 0.35);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: #ffffff;
}

.content-section,
.home-category-block {
  padding: 64px 0 0;
}

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

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

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

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

.section-link {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 900;
}

.search-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.home-search {
  margin-top: -44px;
  position: relative;
  z-index: 8;
}

.search-panel label {
  color: var(--brand-dark);
  font-weight: 900;
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  background: #ffffff;
}

.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.search-box button {
  height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  background: var(--dark);
  color: #ffffff;
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img,
.compact-poster img,
.top-rank-card img,
.movie-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.38);
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h2,
.compact-card h2 {
  margin: 9px 0 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card p,
.compact-card p,
.category-tile p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  margin-top: 12px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.compact-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 15px;
  background: #0f172a;
}

.rank-num {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  color: #ffffff;
  font-weight: 950;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border-radius: 26px;
  padding: 18px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.5), transparent 32%);
}

.category-cover-stack {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 120px;
  margin-bottom: 18px;
}

.category-cover-stack img {
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.category-tile strong {
  position: relative;
  display: block;
  font-size: 24px;
  font-weight: 950;
}

.category-tile p {
  position: relative;
  color: #cbd5e1;
}

.page-hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.26), transparent 24%),
    linear-gradient(135deg, #020617 0%, #0f172a 55%, #115e59 100%);
  color: #ffffff;
  padding: 92px 0 72px;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 48px;
  align-items: center;
}

.compact-stack {
  display: grid;
  gap: 12px;
}

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

.top-rank-card {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border-radius: 26px;
  background: #0f172a;
  color: #ffffff;
}

.top-rank-card img {
  position: absolute;
  inset: 0;
  filter: brightness(0.62);
}

.top-rank-card div {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.top-rank-card strong {
  display: block;
  font-size: 24px;
  font-weight: 950;
}

.top-rank-card p {
  margin: 8px 0 0;
  color: #dbeafe;
  line-height: 1.65;
}

.rank-num.big {
  width: 48px;
  height: 48px;
  font-size: 22px;
}

.player-hero {
  background: #020617;
  color: #ffffff;
  padding: 24px 0 42px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 20px;
}

.breadcrumbs a:hover {
  color: #5eead4;
}

.player-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  align-items: stretch;
}

.player-panel {
  min-width: 0;
}

.movie-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  box-shadow: 0 22px 46px rgba(20, 184, 166, 0.34);
  font-size: 28px;
}

.movie-side {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.movie-side img {
  height: 340px;
}

.side-meta {
  padding: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding-top: 42px;
}

.detail-main,
.detail-aside {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.detail-main {
  padding: clamp(22px, 4vw, 36px);
}

.detail-aside {
  padding: 22px;
  align-self: start;
}

.detail-main h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.lead-text {
  margin: 16px 0 0;
  color: var(--brand-dark);
  font-size: 19px;
  line-height: 1.8;
  font-weight: 800;
}

.detail-meta {
  margin-top: 18px;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-main h2,
.detail-aside h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.detail-main p {
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

.aside-list {
  display: grid;
  gap: 12px;
}

.aside-list .compact-card {
  grid-template-columns: 78px 1fr;
  box-shadow: none;
}

.detail-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.detail-pager a {
  border-radius: 16px;
  padding: 12px 14px;
  background: #f1f5f9;
  color: #0f766e;
  font-weight: 900;
}

.site-footer {
  margin-top: 72px;
  background: #020617;
  color: #94a3b8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 18px 16px;
  text-align: center;
  font-size: 14px;
}

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

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

  .page-hero-grid,
  .player-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .movie-side {
    display: none;
  }
}

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

  .mobile-nav-toggle {
    display: block;
  }

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

  .hero-copy {
    padding-top: 62px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .small-grid,
  .category-card-grid,
  .compact-grid,
  .top-rank-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
  }

  .section-head {
    display: grid;
  }

  .compact-card {
    grid-template-columns: 88px 1fr;
  }

  .page-hero {
    padding: 70px 0 48px;
  }
}

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

  .brand {
    font-size: 20px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero h2 {
    font-size: 26px;
  }

  .hero p,
  .page-hero p,
  .detail-main p {
    font-size: 15px;
  }

  .movie-grid {
    gap: 16px;
  }

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

  .player-hero {
    padding-top: 16px;
  }

  .movie-player {
    border-radius: 18px;
  }
}
