* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5eefb;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.18);
  --blue: #3b82f6;
  --amber: #fbbf24;
  --radius: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.13), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #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;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

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

.site-logo {
  flex: 0 0 auto;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-right: auto;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #22d3ee;
}

.header-search,
.mobile-search,
.filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.filter-form input {
  width: 260px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  color: #f8fafc;
  outline: none;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-form input:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-search button,
.filter-form button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 18px;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 34px rgba(8, 145, 178, 0.22);
}

.header-search button:hover,
.mobile-search button:hover,
.filter-form button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.secondary-button {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: none;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: white;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.72);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
}

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

.mobile-panel-inner {
  display: grid;
  gap: 12px;
  padding: 16px 0 20px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  color: #cbd5e1;
  font-weight: 800;
}

.mobile-link.active {
  color: #22d3ee;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 38%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 54px 0 74px;
}

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

.hero-pill,
.page-pill,
.detail-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  border-radius: 999px;
  padding: 7px 14px;
  color: white;
  font-weight: 800;
  font-size: 0.88rem;
  background: rgba(8, 145, 178, 0.88);
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.24);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(2.3rem, 5.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-arrows {
  position: absolute;
  right: max(24px, calc((100% - 1220px) / 2));
  bottom: 66px;
  z-index: 3;
  display: flex;
  gap: 12px;
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(226, 232, 240, 0.24);
  border-radius: 999px;
  color: white;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(14px);
}

.hero-dots {
  position: absolute;
  left: max(16px, calc((100% - 1220px) / 2));
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(226, 232, 240, 0.32);
}

.hero-dot.active {
  background: #22d3ee;
}

main {
  min-height: 60vh;
}

.section {
  padding: 56px 0 0;
}

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

.section-title,
.page-title {
  margin: 0;
  color: white;
  font-size: clamp(1.65rem, 2.8vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.32);
}

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

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

.movie-card:hover .poster-link img,
.compact-card:hover img,
.rank-item:hover img {
  transform: scale(1.055);
  filter: brightness(1.08);
}

.card-badge,
.quality-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: white;
  font-size: 0.74rem;
  font-weight: 900;
  background: rgba(8, 145, 178, 0.9);
}

.card-badge {
  left: 10px;
}

.quality-badge {
  right: 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.2);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  margin-bottom: 8px;
  color: white;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: #22d3ee;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.25em;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 0.82rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.category-card {
  min-height: 188px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 55%),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  color: white;
  font-size: 1.28rem;
}

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

.category-card span {
  color: #22d3ee;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.22), transparent 34rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0));
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-form {
  width: min(620px, 100%);
}

.filter-form input {
  flex: 1 1 auto;
  width: auto;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span,
.info-tags span {
  display: inline-flex;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 6px 11px;
  color: #cbd5e1;
  font-size: 0.86rem;
  background: rgba(15, 23, 42, 0.68);
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.45);
}

.rank-number {
  color: #22d3ee;
  font-size: 1.2rem;
  font-weight: 950;
}

.rank-item img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.rank-info {
  min-width: 0;
}

.rank-info strong {
  display: block;
  overflow: hidden;
  color: white;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info em {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  color: var(--amber);
  font-weight: 950;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 28px 0 18px;
  color: #94a3b8;
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #22d3ee;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  color: white;
  cursor: pointer;
  background: #020617;
  padding: 0;
  z-index: 3;
}

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

.play-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  filter: brightness(0.82);
}

.play-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.96));
  box-shadow: 0 28px 64px rgba(8, 145, 178, 0.4);
}

.play-icon::before {
  content: "";
  margin-left: 6px;
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 27px solid white;
}

.detail-content,
.detail-side,
.related-box {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.detail-content {
  margin-top: 24px;
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 12px;
  color: white;
  font-size: clamp(1.85rem, 3.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-content h2,
.related-title {
  margin: 28px 0 12px;
  color: white;
  font-size: 1.35rem;
}

.detail-lead {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.detail-content p {
  color: #cbd5e1;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 8px;
}

.detail-side {
  padding: 18px;
  position: sticky;
  top: 92px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: #020617;
}

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

.detail-data {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.detail-data li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding: 10px 0;
  color: #cbd5e1;
}

.detail-data span {
  color: var(--muted);
}

.related-box {
  margin-top: 28px;
  padding: 24px;
}

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

.compact-card {
  display: grid;
  gap: 10px;
  color: #e2e8f0;
  font-weight: 800;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
  background: #020617;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.96));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 46px 0;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 14px;
  color: white;
}

.site-footer h3 {
  width: fit-content;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-footer p,
.site-footer a {
  color: #94a3b8;
}

.site-footer a:hover {
  color: #22d3ee;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 9px;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px;
  color: #64748b;
  text-align: center;
}

.hidden-by-filter {
  display: none !important;
}

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

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

  .detail-side {
    position: static;
  }

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

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

  .hero {
    min-height: 580px;
    height: auto;
  }

  .hero-content {
    padding: 120px 0 76px;
  }

  .hero-arrows {
    right: 16px;
    bottom: 26px;
  }

  .hero-dots {
    left: 16px;
    bottom: 22px;
  }

  .section-head,
  .page-head {
    display: block;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .rank-item {
    grid-template-columns: 38px 56px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

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

  .filter-form,
  .mobile-search {
    width: 100%;
  }

  .filter-form input,
  .mobile-search input {
    width: 100%;
    min-width: 0;
  }
}
