:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(56, 189, 248, 0.18);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #e5eefb;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-bright: #22d3ee;
  --blue: #2563eb;
  --amber: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 8, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.24), transparent 34rem),
    radial-gradient(circle at 84% 16%, rgba(37, 99, 235, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #07111f 45%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

img {
  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 rgba(56, 189, 248, 0.18);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.84), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 42px rgba(2, 8, 23, 0.34);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.32);
}

.logo:hover .logo-mark {
  transform: scale(1.05) rotate(-4deg);
}

.logo-mark,
.card,
.button,
.poster img,
.nav a {
  transition: 0.25s ease;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--cyan-bright);
}

.header-search {
  position: relative;
  width: min(320px, 26vw);
}

.header-search input,
.search-panel input,
.local-filter input {
  width: 100%;
  border: 1px solid rgba(56, 189, 248, 0.24);
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.34);
  border-radius: 999px;
  padding: 11px 44px 11px 16px;
  outline: none;
}

.header-search input:focus,
.search-panel input:focus,
.local-filter input:focus {
  border-color: rgba(34, 211, 238, 0.76);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.header-search button,
.search-panel button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(56, 189, 248, 0.16);
  padding: 0 0 18px;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: #dbeafe;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 70% 22%, rgba(34, 211, 238, 0.24), transparent 32rem);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.26)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, rgba(2, 6, 23, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  min-height: 76vh;
  padding: 92px 0 76px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cyan-bright);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: block;
  margin-top: 8px;
  color: var(--cyan-bright);
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  letter-spacing: -0.03em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.hero-meta,
.movie-meta,
.tag-row,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.44);
  padding: 6px 12px;
  font-size: 0.84rem;
  white-space: nowrap;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(6, 182, 212, 0.18);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(6, 182, 212, 0.28);
}

.button.secondary {
  border-color: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: none;
}

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

.hero-dots button {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
  cursor: pointer;
  padding: 0;
}

.hero-dots button.is-active {
  background: var(--cyan-bright);
}

main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 76px 0 0;
}

.section.compact {
  padding-top: 42px;
}

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

.section-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(2, 8, 23, 0.28);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.32), rgba(37, 99, 235, 0.18)),
    #0f172a;
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

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

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

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

.card-body {
  padding: 16px;
}

.movie-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.04rem;
  line-height: 1.35;
  font-weight: 800;
}

.movie-title a:hover {
  color: var(--cyan-bright);
}

.movie-text {
  margin: 0;
  color: #a8b4c7;
  font-size: 0.92rem;
}

.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

.category-card {
  min-height: 190px;
  padding: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.18), transparent 15rem),
    var(--panel);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 20px;
  color: #a8b4c7;
}

.rank-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 14px;
}

.rank-number {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  font-weight: 900;
}

.search-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 28px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.28);
}

.search-panel form {
  position: relative;
}

.search-panel .quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.local-filter {
  margin: 0 0 24px;
}

.local-filter input {
  border-radius: 18px;
  padding: 14px 16px;
}

.page-hero {
  padding: 76px 0 30px;
  background:
    radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.2), transparent 22rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0));
}

.page-hero h1 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #93c5fd;
  font-size: 0.94rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-panel {
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 28px;
  background: var(--panel-strong);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  background: #020617;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.74));
}

.player-start {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.32);
  cursor: pointer;
}

.player-start span {
  margin-left: 5px;
  font-size: 2.2rem;
  line-height: 1;
}

.player-start:hover {
  transform: scale(1.07);
}

.detail-content {
  padding: 24px;
}

.detail-content h2,
.detail-panel h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.42rem;
  font-weight: 900;
}

.detail-content p,
.detail-panel p {
  color: #b6c2d4;
}

.detail-panel {
  padding: 22px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 10px;
  color: #cbd5e1;
}

.info-list b {
  color: #fff;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 8px;
  background: rgba(2, 6, 23, 0.26);
}

.related-item:hover {
  border-color: rgba(34, 211, 238, 0.36);
  color: var(--cyan-bright);
}

.related-item .poster {
  border-radius: 12px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(56, 189, 248, 0.16);
  padding: 34px 0;
  color: #93a4bd;
  background: rgba(2, 6, 23, 0.64);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

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

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

.empty-state {
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 24px;
  padding: 28px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.74);
}

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

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

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

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

  .nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

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

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

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

  .section-head,
  .footer-inner,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

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

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

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

  .rank-card,
  .related-item {
    grid-template-columns: 86px 1fr;
  }

  .hero-actions,
  .section-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .player-start {
    width: 72px;
    height: 72px;
  }
}
