:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --card: #111827;
  --card-soft: #1e293b;
  --line: rgba(34, 211, 238, 0.18);
  --line-strong: rgba(34, 211, 238, 0.34);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --yellow: #f59e0b;
  --shadow: 0 22px 60px rgba(8, 145, 178, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 0%, rgba(8, 145, 178, 0.26), transparent 30%), linear-gradient(135deg, #020617 0%, #0f1e44 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.page-bg {
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
  font-size: 15px;
  padding-left: 2px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong,
.footer-brand {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 15px;
  white-space: nowrap;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: var(--cyan);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

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

.mobile-link {
  color: var(--soft);
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-link:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

main {
  min-height: 60vh;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 34px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.22), transparent 35%),
    radial-gradient(circle at 86% 10%, rgba(96, 165, 250, 0.20), transparent 30%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 26px;
  align-items: stretch;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.70);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  gap: 34px;
  align-items: center;
  padding: 42px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.hero-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
}

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

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), transparent 48%);
}

.hero-glow {
  position: absolute;
  inset: auto -20% -12% -20%;
  height: 36%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.34), transparent 68%);
  filter: blur(18px);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.hero-tags span,
.tag-row span,
.movie-tags,
.detail-meta span,
.quick-cats a,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.10);
}

.hero-tags span,
.tag-row span,
.filter-chip {
  padding: 7px 12px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.hero-search button,
.filter-btn,
.player-start,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.hero-search button,
.filter-btn,
.player-start {
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.ghost-btn,
.section-link,
.back-link {
  color: var(--cyan);
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.64);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.hero-search button:hover,
.filter-btn:hover,
.player-start:hover,
.back-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.20);
}

.hero-control-row {
  position: absolute;
  left: 42px;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

.hero-arrow,
.hero-dot {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  cursor: pointer;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
}

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

.hero-panel {
  display: grid;
  align-content: start;
  gap: 18px;
}

.hero-search,
.quick-cats,
.hero-side-list,
.filter-panel,
.content-panel,
.detail-panel,
.player-card,
.category-tile,
.rank-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.64));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.hero-search {
  padding: 22px;
}

.hero-search label,
.filter-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--soft);
  font-weight: 700;
}

.hero-search div,
.search-line {
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-line input,
.search-line select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.60);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.hero-search input:focus,
.search-line input:focus,
.search-line select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.quick-cats a {
  padding: 9px 12px;
  font-size: 14px;
}

.hero-side-list {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.hero-side-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-side-item:hover {
  background: rgba(34, 211, 238, 0.08);
  transform: translateX(4px);
}

.hero-side-item img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.hero-side-item strong,
.hero-side-item em {
  display: block;
}

.hero-side-item strong {
  font-size: 15px;
  line-height: 1.45;
}

.hero-side-item em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

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

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.82));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 24px 48px rgba(8, 145, 178, 0.18);
}

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

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

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

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

.play-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 44px;
  min-height: 28px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(245, 158, 11, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-info strong {
  min-height: 1.4em;
  overflow: hidden;
  color: white;
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-info em {
  min-height: 3.2em;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 8px;
  color: #334155;
}

.movie-tags {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 9px;
  color: var(--cyan);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  padding: 22px;
  min-height: 230px;
}

.category-tile h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  z-index: 2;
  margin: 12px 0 20px;
  color: var(--muted);
  line-height: 1.7;
}

.category-posters {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.category-posters img {
  width: 30%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  transform: rotate(-2deg);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
}

.category-posters img:nth-child(2) {
  transform: rotate(3deg) translateY(10px);
}

.category-posters img:nth-child(3) {
  transform: rotate(-4deg) translateY(2px);
}

.filter-panel {
  padding: 20px;
  margin-bottom: 24px;
}

.search-line {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 180px 180px auto;
  gap: 12px;
}

.empty-state {
  display: none;
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 74px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateX(6px);
  border-color: var(--line-strong);
}

.rank-no {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, #0891b2, #1d4ed8);
  font-size: 20px;
  font-weight: 900;
}

.rank-card img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-score {
  color: var(--yellow);
  font-size: 24px;
  font-weight: 900;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 20px;
}

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

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

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.72fr);
  gap: 26px;
}

.player-card {
  overflow: hidden;
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.08));
  z-index: 3;
}

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

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

.player-start {
  position: relative;
  z-index: 4;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  font-weight: 800;
}

.detail-panel {
  padding: 28px;
  margin-top: 26px;
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-panel p {
  color: var(--soft);
  line-height: 1.9;
  margin: 0 0 18px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.detail-meta span {
  padding: 8px 11px;
  font-size: 13px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.related-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-item em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

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

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

.footer-grid a {
  display: block;
  margin-top: 8px;
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-carousel {
    min-height: 520px;
  }

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

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

  .search-line {
    grid-template-columns: 1fr 1fr;
  }
}

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

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

  .brand-text em {
    display: none;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-carousel {
    min-height: 700px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
    align-content: start;
  }

  .hero-media {
    width: min(270px, 72vw);
    margin: 0 auto;
  }

  .hero-control-row {
    left: 24px;
    bottom: 22px;
  }

  .hero-search div,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info em {
    min-height: auto;
  }

  .category-grid,
  .footer-grid,
  .search-line {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 48px 70px minmax(0, 1fr);
  }

  .rank-card img {
    width: 70px;
    height: 94px;
  }

  .rank-score {
    grid-column: 3;
    font-size: 18px;
  }
}
