* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(34, 211, 238, 0.16);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #64748b;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #3b82f6;
  --gold: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.20), transparent 28rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #001018;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.36);
}

.brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.02em;
}

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

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

.desktop-nav a {
  color: var(--muted);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

.mobile-nav {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 45;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
}

main {
  width: 100%;
}

.hero-carousel {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  padding: clamp(28px, 5vw, 72px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.hero-glow {
  position: absolute;
  inset: 12% 4% auto auto;
  width: 48vw;
  height: 48vw;
  min-width: 360px;
  min-height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.24), transparent 62%);
  filter: blur(24px);
  pointer-events: none;
}

.hero-slide {
  position: relative;
  z-index: 2;
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: clamp(26px, 4vw, 64px);
  max-width: 1280px;
  min-height: 68vh;
  margin: 0 auto;
}

.hero-slide.active {
  display: grid;
  animation: heroFade 0.5s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy {
  order: 1;
}

.hero-image {
  order: 2;
  position: relative;
  padding: 16px;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.30), rgba(59, 130, 246, 0.08));
  box-shadow: var(--shadow);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 26px;
  box-shadow: inset 0 -160px 110px rgba(2, 6, 23, 0.62);
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  background: #111827;
}

.eyebrow,
.section-title span,
.aside-head span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  color: var(--cyan);
  font-weight: 800;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(34, 211, 238, 0.10);
}

.hero-copy h1,
.page-hero h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: #f8fafc;
}

.hero-copy p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.20);
  background: rgba(30, 64, 175, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.hero-actions,
.detail-side {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.24);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.full {
  width: 100%;
}

.hero-controls {
  position: relative;
  z-index: 4;
  max-width: 1280px;
  margin: 0 auto 18px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 42px;
  height: 6px;
  overflow: hidden;
  text-indent: -999px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.30);
  cursor: pointer;
}

.hero-controls button.active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-search {
  position: relative;
  z-index: 4;
  display: flex;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.hero-search input,
.search-panel input,
.filter-input,
.filter-select {
  color: var(--text);
  border: 1px solid var(--line);
  outline: none;
  background: rgba(2, 6, 23, 0.64);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  background: transparent;
}

.hero-search button {
  color: #001018;
  border: 0;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.section-panel,
.page-shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px) clamp(18px, 4vw, 36px);
}

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

.section-title h2,
.aside-head h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
}

.section-title a,
.aside-head a {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.category-tile {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.11), transparent),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile strong {
  color: #f8fafc;
  font-size: 21px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.7;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

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

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #001018;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  color: #111827;
  border-radius: 999px;
  background: var(--gold);
  font-size: 12px;
}

.movie-card-body {
  padding: 14px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 12px;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--soft);
  font-size: 12px;
  margin-bottom: 10px;
}

.meta-row span:last-child {
  color: var(--cyan);
}

.hot-aside {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(2, 6, 23, 0.62);
  box-shadow: var(--shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 36px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  background: rgba(15, 23, 42, 0.84);
  border-color: var(--line);
}

.rank-row img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-num {
  color: var(--gold);
  font-weight: 900;
  text-align: center;
}

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

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

.rank-text strong {
  color: #f8fafc;
}

.rank-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  margin-top: 4px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 78px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.22), transparent 32rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.78));
  box-shadow: var(--shadow);
}

.small-hero h1,
.rank-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--muted);
}

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

.breadcrumb strong {
  color: var(--text);
}

.filter-bar,
.search-panel {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}

.search-panel {
  display: block;
}

.search-panel input,
.filter-input,
.filter-select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 16px;
}

.filter-select {
  max-width: 190px;
}

.search-panel input {
  margin-bottom: 22px;
}

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

.ranking-list .rank-row {
  background: rgba(15, 23, 42, 0.64);
  border-color: rgba(148, 163, 184, 0.10);
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #f8fafc;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.70)),
    rgba(2, 6, 23, 0.20);
}

.play-layer span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 46px rgba(34, 211, 238, 0.38);
}

.play-layer strong {
  font-size: 18px;
}

.play-layer.hidden {
  display: none;
}

.detail-copy {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-copy h1 {
  margin: 0 0 14px;
  color: #f8fafc;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.06;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  color: #f8fafc;
  font-size: 22px;
}

.detail-copy p {
  color: #cbd5e1;
  line-height: 2;
  font-size: 16px;
}

.one-line {
  font-size: 18px;
  color: #e0f2fe;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-side {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  background: #111827;
}

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

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

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

  .hot-aside,
  .detail-side {
    position: static;
  }
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    order: 2;
  }

  .hero-image {
    order: 1;
    max-width: 420px;
  }

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

  .section-title,
  .aside-head,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-select {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 0 14px;
  }

  .brand em {
    display: none;
  }

  .hero-carousel {
    min-height: 0;
    padding-top: 24px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .hero-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search input {
    height: 46px;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .catalog-grid,
  .related-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 30px 48px minmax(0, 1fr) auto;
  }

  .page-shell,
  .section-panel {
    padding-left: 14px;
    padding-right: 14px;
  }
}
