:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --line-bright: rgba(34, 211, 238, 0.28);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 18% 0%, rgba(8, 145, 178, 0.22), transparent 34rem),
    radial-gradient(circle at 100% 12%, rgba(30, 64, 175, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #07111f 42%, #020617 100%);
}

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: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #02131d;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 48%, #2563eb);
  box-shadow: 0 14px 42px rgba(34, 211, 238, 0.24);
}

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

.brand-text small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

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

.desktop-nav a,
.nav-dropdown > button {
  color: var(--soft);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 180px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 11px;
}

.dropdown-menu a:hover {
  background: rgba(51, 65, 85, 0.72);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.control-bar input,
.control-bar select {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(30, 41, 59, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 260px;
  padding: 0 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.control-bar input:focus,
.control-bar select:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.top-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.play-cover button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  color: #03131d;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 55%, #3b82f6);
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.top-search button {
  min-height: 42px;
  padding: 0 18px;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.play-cover button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.26);
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.82);
  padding: 10px;
}

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-search input {
  width: 100%;
  padding: 0 16px;
}

.mobile-search button {
  padding: 0 18px;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-panel nav a {
  padding: 11px 12px;
  border-radius: 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slider {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 44%, rgba(2, 6, 23, 0.34) 78%, rgba(2, 6, 23, 0.72) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 52%);
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.14);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 20px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  max-width: 640px;
}

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

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

.hero-tags span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 12px;
  font-weight: 700;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

.secondary-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line-bright);
  box-shadow: none;
}

.secondary-button:hover {
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.94);
  transform: translateY(-1px);
}

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

.hero-dots button {
  width: 42px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.36);
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.6);
}

.hero-side-card {
  position: absolute;
  right: 6vw;
  bottom: 86px;
  width: min(330px, 34vw);
  padding: 20px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-side-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.hero-side-card a {
  display: block;
  padding: 9px 0;
  color: var(--soft);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-side-card a:hover {
  color: var(--cyan);
}

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

.section {
  padding: 54px 0 10px;
}

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

.section-title,
.page-head h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-subtitle,
.page-head p,
.detail-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.view-more {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.56));
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 24px 80px rgba(8, 145, 178, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.65);
}

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

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

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

.poster-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #03131d;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  min-height: 52px;
  margin: 9px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.category-card {
  min-height: 172px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.2), rgba(30, 41, 59, 0.6)),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.rank-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.rank-panel h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 74px 1fr;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(8, 145, 178, 0.1);
}

.rank-item img {
  width: 74px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item strong {
  display: block;
  line-height: 1.25;
}

.rank-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.rank-number {
  width: 32px;
  color: var(--yellow);
  font-weight: 900;
  text-align: center;
}

.control-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
}

.control-bar input,
.control-bar select {
  width: 100%;
  padding: 0 16px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 28px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 26px;
  align-items: start;
  padding: 28px 0 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.72) 46%, rgba(0, 0, 0, 0.8));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-cover button {
  min-width: 148px;
  min-height: 54px;
  padding: 0 24px;
  font-size: 17px;
}

.detail-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  background: rgba(30, 41, 59, 0.65);
}

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

.detail-title h1 {
  margin-bottom: 12px;
}

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

.meta-grid div {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.32);
  color: var(--soft);
}

.content-block {
  margin-top: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
}

.content-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-block p {
  margin: 0;
  color: var(--soft);
  font-size: 17px;
}

.content-block p + p {
  margin-top: 14px;
}

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

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

.footer-brand {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

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

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

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

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

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

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

  .hero-side-card {
    display: none;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .brand {
    min-width: 0;
  }

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

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

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

  .control-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  main,
  .page-main,
  .footer-grid,
  .footer-bottom,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

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

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 520px;
  }

  .hero-inner {
    padding-top: 42px;
  }

  .hero h1 {
    font-size: 36px;
  }

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

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

  .hero-dots button {
    width: 28px;
  }

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