:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #cbd5e1;
  --accent: #f43f5e;
  --accent-2: #38bdf8;
  --accent-3: #a78bfa;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 5%, rgba(56, 189, 248, 0.15), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(244, 63, 94, 0.15), transparent 26rem),
    linear-gradient(180deg, #0f172a 0%, #020617 38%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

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

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #e11d48, #7c3aed 52%, #0284c7);
  box-shadow: 0 14px 34px rgba(244, 63, 94, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  color: #dbeafe;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(148, 163, 184, 0.14);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: saturate(1.12) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.35) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.08) 0%, #020617 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 42px;
  padding: 80px 0 92px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 22px);
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
}

.hero-actions,
.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.quick-links a,
.text-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  box-shadow: 0 18px 42px rgba(244, 63, 94, 0.28);
}

.ghost-button,
.quick-links a,
.section-more,
.text-button {
  min-height: 44px;
  padding: 0 18px;
  color: #e0f2fe;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.52);
}

.primary-button:hover,
.ghost-button:hover,
.quick-links a:hover,
.text-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.hero-dot.active {
  background: white;
}

.section {
  padding: 42px 0;
}

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

.section-head.compact {
  align-items: center;
}

.section-head h2,
.search-panel h2,
.page-hero h1,
.detail-content h2,
.side-card h2,
.site-footer h2 {
  margin: 6px 0 0;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: 30px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 210px 210px;
  gap: 18px;
  margin-top: -48px;
  position: relative;
  z-index: 3;
}

.intro-card,
.search-panel,
.rank-panel,
.category-card,
.detail-content,
.detail-side .side-card,
.page-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 52px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(18px);
}

.intro-card {
  padding: 24px;
}

.intro-card h2 {
  margin: 8px 0 10px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.intro-card p {
  margin: 0;
  color: var(--subtle);
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 160px;
  text-align: center;
}

.stat-card strong {
  font-size: 42px;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  margin-top: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-soft);
}

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

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

.category-tile span {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile small {
  color: #dbeafe;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 22px;
}

.search-panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.45);
}

.search-box input {
  width: 100%;
  color: white;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.chip.active,
.chip:hover {
  border-color: rgba(244, 63, 94, 0.72);
  background: rgba(244, 63, 94, 0.16);
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(148, 163, 184, 0.44);
  background: rgba(30, 41, 59, 0.9);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

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

.poster-play,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.36);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
}

.movie-info {
  padding: 15px;
}

.meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.movie-info h3 {
  margin: 8px 0 6px;
  font-size: 17px;
  line-height: 1.28;
}

.movie-info p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  min-height: 25px;
  padding: 3px 9px;
  color: #bfdbfe;
  font-size: 11px;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.28);
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.78);
}

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

.list-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.14);
  color: #e0f2fe;
  font-weight: 800;
}

.rank-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rank-text strong,
.rank-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text small {
  color: var(--muted);
}

.page-main {
  padding: 42px 0 70px;
}

.page-hero {
  padding: 34px;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at right top, rgba(56, 189, 248, 0.16), transparent 22rem),
    rgba(15, 23, 42, 0.78);
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--subtle);
  font-size: 17px;
}

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

.crumbs a:hover {
  color: white;
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 13px;
  object-fit: cover;
}

.category-card h2 {
  margin: 8px 0;
  font-size: 25px;
}

.category-card p {
  color: var(--subtle);
}

.detail-main {
  max-width: 1180px;
}

.detail-crumbs {
  margin: 0 0 20px;
}

.player-section {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.68fr);
  gap: 24px;
  align-items: stretch;
}

.video-frame {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  z-index: 2;
}

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

.big-play {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  box-shadow: 0 24px 55px rgba(244, 63, 94, 0.32);
}

.detail-title-block {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at right top, rgba(244, 63, 94, 0.18), transparent 19rem),
    rgba(15, 23, 42, 0.78);
}

.detail-title-block h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-title-block p {
  color: var(--subtle);
  font-size: 17px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  margin-top: 24px;
}

.detail-content {
  padding: 28px;
}

.detail-content h2 {
  font-size: 28px;
}

.detail-content p {
  color: var(--subtle);
  font-size: 16px;
}

.large-tags {
  margin-top: 22px;
}

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

.side-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
}

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

.side-card {
  padding: 20px;
}

.side-card p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  color: var(--subtle);
}

.side-card strong {
  color: white;
}

.related-section {
  padding-bottom: 0;
}

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

.empty-state {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  text-align: center;
}

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

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

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

.site-footer a:hover {
  color: white;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

  .menu-button {
    display: block;
  }

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

  .hero-content,
  .player-section,
  .detail-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .intro-card.wide {
    grid-column: 1 / -1;
  }

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

  .rank-panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .nav-wrap {
    height: 64px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero-content {
    padding: 64px 0 86px;
  }

  .intro-grid,
  .search-panel,
  .category-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero,
  .detail-title-block,
  .detail-content {
    padding: 22px;
  }

  .video-frame,
  .movie-player {
    min-height: 260px;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid,
  .full-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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