:root {
  --bg: #141618;
  --panel: #24272c;
  --panel-soft: #2d3138;
  --line: #353940;
  --text: #ffffff;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --primary: #1890ff;
  --primary-dark: #096dd9;
  --primary-soft: rgba(24, 144, 255, 0.16);
  --secondary: #13c2c2;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(20, 22, 24, 0.78);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 26px rgba(24, 144, 255, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  color: #d1d5db;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(24, 144, 255, 0.16);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--panel);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  background: rgba(20, 22, 24, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav.open {
  display: grid;
  gap: 6px;
}

.hero {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  background: #000;
}

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #141618 6%, rgba(20, 22, 24, 0.58) 48%, rgba(20, 22, 24, 0.18)),
    linear-gradient(to right, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18) 62%, rgba(0, 0, 0, 0.5));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 760px;
  padding-top: 64px;
  animation: slideUp 0.7s ease both;
}

.hero-kicker,
.page-hero > span,
.section-head span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: #8cc8ff;
  background: rgba(24, 144, 255, 0.18);
  border: 1px solid rgba(24, 144, 255, 0.38);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

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

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

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

.hero-tags span,
.card-tags span,
.detail-tags span,
.detail-tags a {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.detail-tags a {
  color: #9bd0ff;
  border-color: rgba(24, 144, 255, 0.32);
  background: rgba(24, 144, 255, 0.14);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  color: #e5e7eb;
}

.hero-meta span:first-child {
  color: #facc15;
  font-weight: 800;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(24, 144, 255, 0.28);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  background: rgba(36, 39, 44, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  background: rgba(53, 57, 64, 0.9);
  transform: translateY(-2px);
}

.full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 22, 24, 0.62);
  font-size: 34px;
  line-height: 1;
  transition: 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(20, 22, 24, 0.9);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--primary);
}

.section-block {
  padding: 72px 0 0;
}

.page-main {
  padding-top: 72px;
  min-height: 100vh;
}

.page-hero {
  margin-top: 28px;
  padding: 56px 0 28px;
}

.small-hero {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-hero h1,
.section-head h2 {
  margin: 14px 0 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.page-hero p,
.section-head p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
}

.section-more {
  color: #9bd0ff;
  font-weight: 700;
}

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

.movie-card {
  min-width: 0;
  animation: fadeIn 0.45s ease both;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  transition: 0.28s ease;
}

.card-link:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.poster-wrap img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.05));
  transition: opacity 0.25s ease;
}

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

.cat-badge,
.time-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(24, 144, 255, 0.9);
  backdrop-filter: blur(8px);
}

.cat-badge {
  left: 12px;
}

.time-badge {
  right: 12px;
  background: rgba(20, 22, 24, 0.86);
}

.rank-badge {
  top: auto;
  bottom: 12px;
  left: 12px;
  background: rgba(250, 204, 21, 0.95);
  color: #111827;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(24, 144, 255, 0.9);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 13px;
}

.score {
  color: #facc15;
  font-weight: 800;
  white-space: nowrap;
}

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

.category-card,
.category-overview-card a {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 210px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 22, 24, 0.95), rgba(20, 22, 24, 0.15));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 18px;
}

.category-card span {
  padding-top: 112px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

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

.category-overview-card a {
  min-height: 0;
  padding: 18px;
}

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

.category-covers img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-card span {
  color: #8cc8ff;
  font-size: 13px;
  font-weight: 800;
}

.category-overview-card h2 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.category-overview-card p {
  margin: 0;
  color: var(--muted);
}

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

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

.latest-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), rgba(36, 39, 44, 0.62));
}

.latest-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.latest-row img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.latest-row strong,
.latest-row em {
  display: block;
}

.latest-row strong {
  color: #fff;
}

.latest-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-row b {
  color: #9bd0ff;
}

.search-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel);
}

.search-tools label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.search-tools input,
.search-tools select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: #1d2025;
  padding: 0 12px;
  outline: none;
}

.search-tools input:focus,
.search-tools select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.14);
}

.empty-result {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  background: var(--panel);
}

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

.rank-row {
  border-radius: 16px;
  background: var(--panel);
  transition: 0.25s ease;
}

.rank-row:hover {
  background: var(--panel-soft);
  transform: translateX(4px);
}

.rank-link {
  display: grid;
  grid-template-columns: 58px 128px minmax(0, 1fr) 128px;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-num {
  color: #facc15;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-link img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.rank-main strong,
.rank-main em,
.rank-side b,
.rank-side small {
  display: block;
}

.rank-main strong {
  font-size: 18px;
}

.rank-main em {
  margin: 4px 0 8px;
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-side {
  text-align: right;
}

.rank-side b {
  color: #facc15;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding-top: 28px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin: 0 0 18px;
}

.crumbs a {
  color: #9bd0ff;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, 0.36);
}

.player-start span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: rgba(24, 144, 255, 0.92);
  font-size: 34px;
  box-shadow: 0 16px 34px rgba(24, 144, 255, 0.38);
  transition: 0.25s ease;
}

.player-start:hover span {
  transform: scale(1.08);
}

.player-card.playing .player-start {
  display: none;
}

.player-loading,
.player-message {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border-radius: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
}

.detail-card,
.side-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel);
}

.detail-card h1 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.15;
}

.lead {
  color: #d1d5db;
  font-size: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 0;
  margin: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-grid span {
  display: grid;
  gap: 4px;
  text-align: center;
}

.stats-grid b {
  color: #fff;
  font-size: 20px;
}

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

.detail-card h2 {
  margin: 26px 0 10px;
  font-size: 24px;
}

.detail-card p {
  color: #d1d5db;
}

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

.side-card {
  margin-top: 44px;
}

.side-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.side-card h2 {
  margin: 16px 0 8px;
}

.side-card p {
  color: var(--muted);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #101214;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
  color: var(--muted);
}

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

.footer-links a:hover {
  color: #fff;
}

[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

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

  .side-card {
    margin-top: 0;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 76vh;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .card-body p,
  .card-tags {
    display: none;
  }

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

  .rank-link {
    grid-template-columns: 42px 92px minmax(0, 1fr);
  }

  .rank-side {
    grid-column: 3;
    text-align: left;
  }

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

  .latest-row {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .latest-row b {
    display: none;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .split-section .movie-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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