* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #ffffff;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --orange: #f97316;
  --pink: #ec4899;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.header-inner {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), #2563eb 48%, var(--orange));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.26);
}

.brand-text {
  white-space: nowrap;
  font-size: 18px;
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 14px;
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.header-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: none;
  transition: border 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.header-search input {
  width: 180px;
  padding: 10px 14px;
}

.header-search input:focus {
  width: 240px;
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-button {
  border: 0;
  border-radius: 16px;
  padding: 11px 18px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), #2563eb 52%, var(--orange));
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.32);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

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

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

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

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

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

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

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

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

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 670px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 84px 0 118px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-kicker::before,
.section-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 700px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.card-tags span {
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #cffafe;
  font-size: 12px;
  font-weight: 700;
}

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

.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 11px 18px;
  color: #ffffff;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease, transform 0.18s ease;
}

.ghost-button:hover,
.text-link:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 38px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 32px;
  height: 6px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.5;
}

.hero-dot.active {
  width: 54px;
  opacity: 1;
  background: var(--cyan);
}

.section-block,
.category-strip,
.layout-two {
  padding: 72px 0;
}

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

.section-head h2,
.category-strip h2,
.ranking-panel h2,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.category-strip {
  display: grid;
  gap: 26px;
}

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

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

.category-tile {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border 0.22s ease;
}

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

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: transform 0.32s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

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

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile strong {
  bottom: 56px;
  font-size: 22px;
}

.category-tile em {
  bottom: 18px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

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

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

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

.movie-card.hidden {
  display: none;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.92);
}

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

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

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--cyan);
  color: #04111f;
  font-size: 14px;
  font-weight: 900;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  padding: 0 8px;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  color: #ffffff;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-tags {
  margin-bottom: 10px;
}

.card-tags span {
  padding: 4px 8px;
  font-size: 11px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

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

.card-body p {
  margin: 0;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.compact-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.compact-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.18s ease, transform 0.18s ease;
}

.compact-item:hover {
  background: rgba(34, 211, 238, 0.12);
  transform: translateX(3px);
}

.compact-item span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan);
  font-weight: 900;
}

.compact-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  padding: 72px 0 34px;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.large-search input {
  padding: 14px 16px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.large-search input:focus,
.header-search input:focus,
.mobile-search input:focus {
  border-color: rgba(34, 211, 238, 0.62);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.large-search {
  max-width: 720px;
  margin-top: 24px;
}

.large-search input {
  flex: 1;
}

.detail-hero {
  padding: 52px 0 30px;
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.detail-info .lead {
  max-width: 820px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
  margin: 18px 0 22px;
}

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

.meta-list div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
}

.meta-list dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.watch-block {
  padding: 34px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  background: rgba(2, 6, 23, 0.28);
  color: #ffffff;
  font-weight: 900;
  font-size: 20px;
  pointer-events: auto;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button-mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  color: #04111f;
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.32);
}

.detail-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 32px 0;
}

.copy-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.copy-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.copy-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.88;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0 26px;
}

.footer-grid p {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.16);
}

.copyright {
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 13px;
}

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

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

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

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

  .hero,
  .hero-content {
    min-height: 600px;
  }

  .layout-two,
  .detail-grid,
  .detail-copy,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

  .detail-poster {
    max-width: 360px;
  }
}

@media (max-width: 620px) {
  .site-container {
    width: min(100% - 22px, 1180px);
  }

  .header-inner {
    height: 66px;
  }

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

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

  .hero-content {
    padding: 62px 0 110px;
  }

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

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

  .hero-controls {
    bottom: 24px;
  }

  .section-block,
  .category-strip,
  .layout-two {
    padding: 46px 0;
  }

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

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

  .filter-bar,
  .meta-list {
    grid-template-columns: 1fr;
  }

  .large-search {
    flex-direction: column;
    align-items: stretch;
  }

  .player-overlay {
    font-size: 16px;
  }

  .play-button-mark {
    width: 62px;
    height: 62px;
  }
}
