:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --orange: #f97316;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: white;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #cbd5e1;
  font-size: 15px;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.section-link:hover,
.text-link:hover {
  color: var(--cyan);
}

.header-search {
  margin-left: auto;
  width: min(300px, 32vw);
}

.header-search input,
.mobile-panel input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  outline: none;
  padding: 11px 14px;
}

.header-search input:focus,
.mobile-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(2, 6, 23, 0.96);
}

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

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

.hero-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease, transform 800ms ease;
  transform: scale(1.02);
}

.hero-panel.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.35fr 0.82fr 0.82fr;
  gap: 0;
}

.hero-image {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

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

.hero-image-main {
  grid-row: span 2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.78) 38%, rgba(2, 6, 23, 0.2) 70%, rgba(2, 6, 23, 0.72) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 740px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero h1,
.hero h2 {
  font-size: clamp(38px, 7vw, 74px);
  max-width: 780px;
}

.hero h2 + p,
.hero h1 + h2 + p,
.page-hero p,
.detail-intro .lead {
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-content p {
  max-width: 660px;
  margin: 20px 0 0;
}

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

.hero-tags span,
.detail-badges span,
.tag-list span {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  padding: 7px 12px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, color 200ms ease;
}

.primary-btn,
.ghost-btn {
  min-height: 46px;
  border-radius: 14px;
  padding: 0 20px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: white;
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
}

.ghost-btn:hover {
  border-color: rgba(34, 211, 238, 0.6);
  color: var(--cyan);
}

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

.hero-dots button {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

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

.quick-entry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.quick-entry a,
.filter-panel,
.rank-panel,
.detail-text-card,
.category-overview-card,
.category-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.quick-entry a {
  border-radius: 20px;
  padding: 22px;
}

.quick-entry strong,
.quick-entry span {
  display: block;
}

.quick-entry strong {
  font-size: 20px;
  margin-bottom: 4px;
}

.quick-entry span {
  color: var(--muted);
}

.content-section {
  padding: 76px 0 0;
}

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

.section-head h2,
.rank-panel h2,
.detail-side h2,
.detail-text-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.section-link,
.text-link {
  color: var(--cyan);
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(15, 23, 42, 0.8));
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent 52%);
  opacity: 0;
  transition: opacity 250ms ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark,
.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.92);
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.24);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 250ms ease, transform 250ms ease;
}

.play-mark::after,
.big-play::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 17px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid white;
}

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

.corner-tag,
.corner-label {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  backdrop-filter: blur(10px);
}

.corner-left {
  left: 12px;
  background: rgba(249, 115, 22, 0.86);
}

.corner-right {
  right: 12px;
  background: rgba(2, 6, 23, 0.68);
}

.corner-label {
  left: 12px;
  bottom: 12px;
  top: auto;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  min-height: 2.6em;
  font-size: 18px;
  line-height: 1.3;
}

.movie-info h3 a:hover {
  color: var(--cyan);
}

.movie-info p {
  min-height: 3em;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

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

.category-card {
  display: grid;
  gap: 16px;
  border-radius: 22px;
  padding: 16px;
  transition: transform 220ms ease, border-color 220ms ease;
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.5);
}

.category-card-images {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 7px;
  height: 132px;
  overflow: hidden;
  border-radius: 16px;
}

.category-card-images img,
.overview-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card h3,
.category-overview-card h2 {
  margin: 0 0 6px;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-panel {
  position: sticky;
  top: 94px;
  border-radius: 24px;
  padding: 22px;
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.rank-panel-head a {
  color: var(--cyan);
  font-weight: 700;
  white-space: nowrap;
}

.rank-panel ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row a {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.34);
}

.rank-row a:hover {
  background: rgba(34, 211, 238, 0.1);
}

.rank-number {
  color: var(--cyan);
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title,
.rank-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 30rem), linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
}

.page-hero .container {
  padding: 86px 0 62px;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
}

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

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

.filter-panel {
  margin-top: 28px;
  border-radius: 22px;
  padding: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  border-radius: 24px;
  padding: 18px;
  transition: transform 220ms ease, border-color 220ms ease;
}

.category-overview-card:hover {
  border-color: rgba(34, 211, 238, 0.5);
}

.overview-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  height: 156px;
  border-radius: 16px;
  overflow: hidden;
}

.overview-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-hero .container {
  padding: 46px 0 48px;
}

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

.detail-poster {
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: var(--shadow);
}

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

.detail-intro h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.detail-watch {
  padding-top: 40px;
}

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

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82));
}

.player-overlay .big-play {
  position: relative;
  left: auto;
  top: auto;
  opacity: 1;
  transform: none;
}

.player-overlay strong {
  max-width: min(760px, 86%);
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.2;
  text-align: center;
}

.player-overlay small {
  color: #cbd5e1;
  font-size: 16px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding-top: 34px;
  padding-bottom: 78px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.detail-text-card {
  border-radius: 24px;
  padding: 26px;
}

.detail-text-card p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 94px;
  align-self: start;
}

.related-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
}

.compact-poster {
  aspect-ratio: 1 / 1;
  height: 100%;
}

.movie-card-compact .movie-info {
  padding: 12px;
}

.movie-card-compact .movie-info h3 {
  min-height: 0;
  font-size: 15px;
}

.movie-card-compact .movie-info p {
  min-height: 0;
  margin-bottom: 9px;
  font-size: 13px;
}

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

.footer-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.footer-inner div {
  display: flex;
  gap: 16px;
}

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    height: 720px;
    justify-content: flex-end;
    padding-bottom: 96px;
  }

  .hero-collage {
    grid-template-columns: 1fr;
  }

  .hero-image:not(.hero-image-main) {
    display: none;
  }

  .quick-entry,
  .filter-grid,
  .category-overview-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .header-inner {
    min-height: 64px;
  }

  .site-logo span:last-child {
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .hero-actions,
  .section-head,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .page-hero .container {
    padding: 64px 0 44px;
  }

  .content-section {
    padding-top: 52px;
  }

  .detail-content {
    padding-bottom: 52px;
  }
}
