:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --gold: #f59e0b;
  --gold-2: #f97316;
  --green: #22c55e;
  --radius: 18px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 8%, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #cbd5e1;
  font-size: 15px;
}

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

.main-nav a:hover,
.footer-links a:hover,
.movie-card h2 a:hover,
.crumb a:hover {
  color: var(--gold);
}

.nav-search {
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(51, 65, 85, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 3px 4px 3px 12px;
}

.nav-search button,
.filter-panel button {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: rgba(51, 65, 85, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  gap: 10px;
}

.mobile-nav a {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.45);
  border-radius: 12px;
}

.content-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 46px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(1.01);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-slide::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.9)),
    var(--hero-image) center / cover no-repeat;
  filter: blur(16px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.42;
  z-index: -2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), #020617 92%);
}

.hero-content {
  padding-top: 70px;
}

.hero-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 20px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  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 {
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.26);
}

.btn-ghost {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-cover {
  position: relative;
  aspect-ratio: 3 / 4.16;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.16);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-cover:hover img {
  transform: scale(1.05);
}

.hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.82));
}

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(148, 163, 184, 0.5);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--gold);
}

.intro-block {
  padding: 58px 0 12px;
}

.intro-block h1,
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.12;
}

.intro-block p,
.page-hero p {
  max-width: 820px;
  color: #cbd5e1;
  font-size: 17px;
}

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

.section-head h2,
.ranking-title h2,
.detail-text h2,
.site-footer h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

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

.section-more,
.ranking-title a {
  color: var(--gold);
  font-weight: 800;
}

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

.category-tile,
.category-panel {
  min-height: 150px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-panel:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-tile strong,
.category-panel h2 {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.category-tile span,
.category-panel p {
  color: var(--muted);
  font-size: 14px;
}

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

.category-panel-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: #cbd5e1;
}

.category-panel-links a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

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

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

.movie-card:hover {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.18;
  overflow: hidden;
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.86));
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.poster-link em,
.rank-badge {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 26px;
  padding: 0 8px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(248, 250, 252, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.poster-link em {
  right: 10px;
}

.rank-badge {
  left: 10px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

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

.movie-card h2 {
  margin: 0 0 8px;
  overflow: hidden;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.card-meta span,
.card-meta a {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.tag-row span {
  padding: 3px 8px;
  color: #cbd5e1;
  font-size: 12px;
}

.ranking-box {
  position: sticky;
  top: 100px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ranking-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.ranking-box ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-box a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: rgba(51, 65, 85, 0.38);
  border-radius: 14px;
}

.ranking-box b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 999px;
}

.ranking-box span,
.ranking-box em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-box em {
  display: block;
  grid-column: 2;
  margin-top: -8px;
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
}

.page-main {
  padding: 34px 0 0;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.crumb strong {
  color: #f8fafc;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: clamp(30px, 5vw, 58px);
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.2), transparent 28rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.74));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.slim-hero {
  margin-bottom: 32px;
}

.page-actions {
  margin-top: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 180px;
  gap: 12px;
  margin: 22px 0;
  padding: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  outline: 0;
  padding: 11px 13px;
}

.filter-panel option {
  background: #0f172a;
}

.detail-main {
  max-width: 1180px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 28px;
  padding: clamp(22px, 4vw, 34px);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.76));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-one {
  max-width: 780px;
  color: #cbd5e1;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 12px;
}

.detail-meta span {
  padding: 7px 12px;
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

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

.player-section {
  margin: 28px 0;
}

.video-box {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(248, 250, 252, 0.14);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.55));
  border: 0;
  cursor: pointer;
}

.video-overlay span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 999px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.34);
  font-size: 34px;
}

.video-overlay.is-hidden {
  display: none;
}

.detail-text {
  display: grid;
  gap: 14px;
  margin: 30px 0;
  padding: clamp(22px, 4vw, 32px);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.detail-text p {
  margin: 0 0 16px;
  white-space: pre-line;
}

.content-section {
  margin-top: 24px;
}

.site-footer {
  margin-top: 70px;
  padding: 48px 0 26px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.78);
  border-top: 1px solid var(--line);
}

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

.site-footer h2 {
  margin-bottom: 14px;
  color: #f8fafc;
  font-size: 20px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  color: var(--muted);
}

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  color: var(--muted-2);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

.movie-card-compact .movie-card-body p {
  min-height: auto;
}

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

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

@media (max-width: 980px) {
  .main-nav,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav {
    display: none;
  }

  body.menu-open .mobile-nav {
    display: flex;
  }

  .hero-shell {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    align-content: center;
  }

  .hero-cover {
    width: min(300px, 70vw);
    justify-self: center;
  }

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

  .ranking-box {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    height: 66px;
  }

  .brand {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .hero-shell {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 24px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-actions {
    gap: 9px;
  }

  .btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .page-hero,
  .detail-hero {
    border-radius: 22px;
  }
}

@media (max-width: 420px) {
  .content-wrap,
  .nav-wrap,
  .mobile-nav,
  .footer-grid,
  .copyright {
    width: min(100% - 20px, 1240px);
  }

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

  .movie-card h2 {
    font-size: 14px;
  }
}
