:root {
  --fog-950: #07090d;
  --fog-900: #111418;
  --fog-850: #151a20;
  --fog-800: #1c232b;
  --fog-750: #252d36;
  --fog-700: #343a40;
  --fog-600: #495057;
  --fog-500: #6c757d;
  --fog-400: #adb5bd;
  --fog-300: #ced4da;
  --fog-200: #dee2e6;
  --fog-100: #e9ecef;
  --fog-50: #f8f9fa;
  --frost-600: #005ab3;
  --frost-500: #0073e6;
  --frost-400: #1a8cff;
  --frost-300: #4da6ff;
  --gold: #facc15;
  --danger: #fca5a5;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.42);
  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 115, 230, 0.15), transparent 34rem),
    radial-gradient(circle at 95% 8%, rgba(77, 166, 255, 0.08), transparent 28rem),
    var(--fog-900);
  color: var(--fog-100);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 20, 24, 0.86);
  backdrop-filter: blur(16px);
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--fog-50);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--frost-400), var(--frost-600));
  box-shadow: 0 10px 30px rgba(0, 115, 230, 0.35);
}

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--fog-300);
  font-size: 15px;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--fog-50);
  background: rgba(0, 115, 230, 0.18);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fog-50);
  cursor: pointer;
}

.page-shell {
  padding: 28px 0 70px;
}

.hero,
.page-hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--fog-800);
  box-shadow: var(--shadow-soft);
}

.compact-hero {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(32px, 7vw, 82px);
  background:
    linear-gradient(120deg, rgba(0, 115, 230, 0.32), transparent 44%),
    linear-gradient(135deg, var(--fog-800), var(--fog-900));
}

.ranking-hero {
  min-height: 460px;
}

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

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

.hero-slide img,
.ranking-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 20, 24, 0.96) 0%, rgba(17, 20, 24, 0.78) 46%, rgba(17, 20, 24, 0.1) 100%),
    linear-gradient(0deg, rgba(17, 20, 24, 0.68), transparent 48%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 680px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(77, 166, 255, 0.46);
  border-radius: 999px;
  padding: 6px 13px;
  background: rgba(0, 115, 230, 0.2);
  color: var(--frost-300);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-side h1 {
  margin: 16px 0 14px;
  color: var(--fog-50);
  font-size: clamp(36px, 7vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--fog-200);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(28, 35, 43, 0.78);
  color: var(--fog-200);
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  background: var(--frost-500);
  color: white;
  box-shadow: 0 15px 34px rgba(0, 115, 230, 0.34);
}

.primary-button:hover {
  background: var(--frost-600);
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(28, 35, 43, 0.66);
  color: var(--fog-100);
}

.ghost-button:hover,
.text-link:hover {
  border-color: rgba(77, 166, 255, 0.45);
  color: var(--frost-300);
}

.hero-arrow,
.rail-button {
  position: absolute;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 35, 43, 0.78);
  color: var(--fog-100);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: 0.2s ease;
}

.hero-arrow:hover,
.rail-button:hover {
  background: rgba(52, 58, 64, 0.92);
  color: white;
}

.hero-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.hero-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

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

.hero-dots button {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--fog-500, #6c757d);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 38px;
  background: var(--frost-400);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  margin: 28px 0 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(28, 35, 43, 0.78);
  backdrop-filter: blur(12px);
}

.search-box input,
.filter-row select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: none;
  background: rgba(17, 20, 24, 0.78);
  color: var(--fog-100);
}

.search-box input {
  padding: 0 16px;
}

.filter-row {
  display: flex;
  gap: 10px;
}

.filter-row select {
  min-width: 128px;
  padding: 0 12px;
}

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

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-head span {
  color: var(--frost-400);
  font-size: 24px;
}

.section-head h2 {
  margin: 0;
  color: var(--fog-50);
  font-size: clamp(24px, 3vw, 36px);
}

.section-head i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 115, 230, 0.7), transparent);
}

.section-more,
.text-link {
  color: var(--frost-300);
  font-size: 14px;
  font-weight: 800;
}

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

.movie-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--fog-800);
  box-shadow: var(--shadow-card);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  outline: 2px solid rgba(0, 115, 230, 0.48);
}

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

.card-link,
.poster-frame,
.card-body,
.card-meta,
.card-caption,
.rail-item,
.rail-image,
.category-tile,
.rank-row,
.rank-card {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--fog-750);
}

.poster-frame img,
.rail-image img,
.category-tile img,
.rank-row img,
.rank-card img,
.detail-side > img,
.category-panel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-frame img,
.rail-item:hover .rail-image img,
.category-tile:hover img,
.rank-row:hover img,
.rank-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 20, 24, 0.98) 0%, transparent 56%);
}

.play-badge,
.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 115, 230, 0.9);
  box-shadow: 0 12px 35px rgba(0, 115, 230, 0.45);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: 0.25s ease;
}

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

.year-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(17, 20, 24, 0.8);
  color: var(--fog-50);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
}

.card-caption strong,
.card-caption em,
.card-title,
.card-line,
.card-tags {
  display: block;
}

.card-caption strong {
  color: var(--fog-50);
  font-size: 15px;
}

.card-caption em,
.card-line,
.rail-item em,
.rank-row em,
.rank-card em,
.rank-card small {
  color: var(--fog-400);
  font-size: 13px;
  font-style: normal;
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.card-meta b {
  color: var(--frost-300);
  font-size: 12px;
}

.card-meta i,
.rank-row i,
.rank-card i {
  color: var(--gold);
  font-style: normal;
  font-weight: 800;
}

.card-title {
  margin-bottom: 5px;
  color: var(--fog-50);
  font-weight: 800;
}

.card-line {
  min-height: 42px;
  color: var(--fog-300);
  font-size: 13px;
}

.card-tags {
  margin-top: 10px;
  color: var(--fog-500);
  font-size: 12px;
}

.rail-wrap {
  position: relative;
}

.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 270px;
}

.rail-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: var(--fog-750);
}

.rail-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 20, 24, 0.78), transparent 60%);
}

.rail-image span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  color: var(--frost-300);
  font-size: 12px;
  font-weight: 800;
}

.rail-item strong {
  display: block;
  margin: 11px 0 2px;
  color: var(--fog-50);
}

.rail-button {
  top: 44%;
  opacity: 0;
}

.rail-wrap:hover .rail-button {
  opacity: 1;
}

.rail-left {
  left: -18px;
}

.rail-right {
  right: -18px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--fog-800);
  box-shadow: var(--shadow-card);
}

.category-tile span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(17, 20, 24, 0.96), transparent 55%),
    linear-gradient(120deg, rgba(0, 115, 230, 0.38), transparent 45%);
}

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

.category-tile strong {
  bottom: 54px;
  color: white;
  font-size: 22px;
}

.category-tile em {
  bottom: 18px;
  color: var(--fog-300);
  font-size: 13px;
  font-style: normal;
}

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

.rank-row,
.rank-card {
  display: grid;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(28, 35, 43, 0.82);
  transition: 0.2s ease;
}

.rank-row {
  grid-template-columns: 54px 72px 1fr auto;
  padding: 10px 14px;
}

.rank-card {
  grid-template-columns: 70px 94px 1fr auto;
  padding: 12px 16px;
}

.rank-row:hover,
.rank-card:hover {
  border-color: rgba(0, 115, 230, 0.45);
  transform: translateX(4px);
}

.rank-row b,
.rank-card b {
  color: var(--frost-300);
  font-size: 20px;
}

.rank-row img,
.rank-card img {
  border-radius: 12px;
  aspect-ratio: 3 / 4;
}

.rank-row strong,
.rank-card strong {
  display: block;
  color: var(--fog-50);
  font-size: 16px;
}

.rank-card small {
  display: block;
  margin-top: 4px;
}

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

.category-panel {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--fog-800);
  box-shadow: var(--shadow-card);
}

.category-panel-cover {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 190px;
  overflow: hidden;
}

.category-panel-body {
  padding: 22px;
}

.category-panel h2 {
  margin: 0 0 10px;
  color: var(--fog-50);
}

.category-panel p {
  margin: 0 0 18px;
  color: var(--fog-300);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 22px;
  color: var(--fog-400);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--frost-300);
}

.breadcrumb em {
  color: var(--fog-200);
  font-style: normal;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: stretch;
}

.player-panel {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: black;
  box-shadow: var(--shadow-soft);
}

.player-panel video {
  width: 100%;
  height: 100%;
  min-height: 520px;
  background: black;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: black;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

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

.player-dim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 115, 230, 0.2), transparent 22rem),
    rgba(0, 0, 0, 0.45);
}

.detail-side {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--fog-800);
  box-shadow: var(--shadow-card);
}

.detail-side > img {
  aspect-ratio: 3 / 4;
}

.detail-side-body {
  padding: 20px;
}

.detail-side h1 {
  font-size: 30px;
  letter-spacing: -0.03em;
}

.detail-side p {
  color: var(--fog-300);
}

.detail-info {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}

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

.meta-grid span {
  min-height: 76px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(28, 35, 43, 0.86);
  color: var(--fog-100);
}

.meta-grid b {
  display: block;
  margin-bottom: 6px;
  color: var(--fog-400);
  font-size: 13px;
}

.meta-grid a {
  color: var(--frost-300);
}

.detail-text-block {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(28, 35, 43, 0.68);
}

.detail-text-block h2 {
  margin: 0 0 14px;
  color: var(--fog-50);
}

.detail-text-block p {
  margin: 0;
  color: var(--fog-200);
  font-size: 17px;
}

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

.tag-cloud a {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0, 115, 230, 0.16);
  color: var(--frost-300);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 9, 13, 0.55);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  padding: 34px 0;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--fog-400);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.footer-links a {
  color: var(--fog-300);
}

.footer-links a:hover {
  color: var(--frost-300);
}

.no-results {
  grid-column: 1 / -1;
  padding: 26px;
  border-radius: 16px;
  background: rgba(28, 35, 43, 0.86);
  color: var(--fog-300);
  text-align: center;
}

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px 1fr;
  }

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

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

@media (max-width: 760px) {
  .site-header-inner {
    min-height: 64px;
  }

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(17, 20, 24, 0.96);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .page-hero,
  .ranking-hero {
    min-height: 590px;
  }

  .hero-content {
    width: calc(100% - 36px);
  }

  .hero-gradient {
    background: linear-gradient(0deg, rgba(17, 20, 24, 0.96) 0%, rgba(17, 20, 24, 0.7) 55%, rgba(17, 20, 24, 0.26) 100%);
  }

  .hero-arrow {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .filter-row {
    flex-direction: column;
  }

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

  .rank-row,
  .rank-card {
    grid-template-columns: 44px 64px 1fr;
  }

  .rank-row i,
  .rank-card i {
    grid-column: 2 / 4;
    padding-left: 78px;
  }

  .player-panel,
  .player-panel video {
    min-height: 280px;
  }

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

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .site-header-inner,
  .page-shell,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

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

  .hero,
  .page-hero,
  .ranking-hero {
    border-radius: 18px;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
