:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
  --radius: 20px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

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

.header-inner {
  width: min(1180px, 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;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.35);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  line-height: 1;
  font-size: 20px;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--soft);
  font-size: 14px;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.12);
  color: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #fff;
}

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

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

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 42%, transparent 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 86px;
  width: min(640px, calc(100% - 64px));
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.lead {
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.tag-list,
.search-chips,
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.tag-list a,
.search-chips button,
.filter-buttons button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--soft);
  padding: 8px 13px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.search-box button {
  border: 0;
  background: #fff;
  color: #0f172a;
}

.ghost-btn,
.text-link {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.38);
  color: #fff;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.search-box button:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.42);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #fff;
}

.section {
  padding: 72px 0;
}

.section.no-top {
  padding-top: 0;
}

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

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

.section-head h2,
.category-overview-head h2,
.content-card h2 {
  margin: 10px 0 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-head a,
.category-overview-head a {
  color: #7dd3fc;
  font-weight: 700;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 24px 60px rgba(14, 165, 233, 0.16);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.movie-card.small .card-cover {
  aspect-ratio: 3 / 4;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 46%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  backdrop-filter: blur(10px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.7);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.45;
}

.card-body h3 a:hover {
  color: #7dd3fc;
}

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

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
}

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

.rank-list.tall {
  align-self: start;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding-right: 4px;
}

.rank-row a {
  display: grid;
  grid-template-columns: 40px 58px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(14, 165, 233, 0.12);
}

.rank-num {
  color: #7dd3fc;
  font-size: 22px;
  font-weight: 900;
}

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

.rank-info {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rank-info strong,
.mini-card span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

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

.category-tile,
.category-overview-card,
.content-card,
.filter-panel,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.88));
  box-shadow: var(--shadow);
}

.category-tile {
  display: grid;
  gap: 14px;
  padding: 18px;
  min-height: 184px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.42);
}

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

.category-covers img {
  height: 76px;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

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

.category-tile em,
.category-overview-card p,
.content-card p {
  color: var(--muted);
  font-style: normal;
  line-height: 1.75;
}

.page-main {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  padding: 58px 0 36px;
}

.page-hero {
  max-width: 920px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #7dd3fc;
}

.category-overview-list {
  display: grid;
  gap: 24px;
  padding-bottom: 72px;
}

.category-overview-card {
  padding: 24px;
}

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

.mini-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  color: var(--soft);
  font-size: 13px;
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.filter-panel,
.search-panel {
  margin-bottom: 32px;
  padding: 20px;
}

.filter-search input,
.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: rgba(2, 6, 23, 0.5);
  color: #fff;
  padding: 0 18px;
}

.filter-buttons {
  margin-top: 16px;
}

.filter-buttons button,
.search-chips button {
  cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover,
.search-chips button:hover {
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.18);
  color: #fff;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.search-chips {
  margin-top: 16px;
}

.rank-page-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 30px;
  padding-bottom: 72px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.detail-meta li {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.64);
}

.detail-meta span {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta strong {
  font-size: 15px;
}

.player-section {
  padding: 16px 0 32px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.24), rgba(2, 6, 23, 0.56));
  cursor: pointer;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 34px;
  backdrop-filter: blur(12px);
}

.player-cover.hidden {
  display: none;
}

.detail-content {
  display: grid;
  gap: 20px;
  padding: 12px 0 20px;
}

.content-card {
  padding: 24px;
}

.content-card h2 {
  margin-top: 0;
}

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

.prev-next a {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--soft);
}

.prev-next a:last-child {
  text-align: right;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 30px;
  padding: 44px 0 28px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: var(--muted);
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 13px;
}

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

  .menu-toggle {
    display: block;
  }

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

  .split-layout,
  .rank-page-layout {
    grid-template-columns: 1fr;
  }

  .rank-list.tall {
    position: static;
    max-height: none;
  }

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

@media (max-width: 760px) {
  .hero {
    height: 620px;
  }

  .hero-content {
    left: 20px;
    bottom: 80px;
    width: calc(100% - 40px);
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 46px 0;
  }

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

  .grid-six,
  .grid-five,
  .grid-four,
  .category-grid,
  .detail-layout,
  .detail-meta,
  .footer-grid,
  .prev-next {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    gap: 16px;
  }

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

  .card-cover,
  .movie-card.small .card-cover {
    height: 100%;
    min-height: 172px;
    aspect-ratio: auto;
  }

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

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

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

  .prev-next a:last-child {
    text-align: left;
  }
}

@media (max-width: 460px) {
  .header-inner {
    height: 66px;
  }

  .brand-text small {
    display: none;
  }

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

  .card-cover,
  .movie-card.small .card-cover {
    min-height: 154px;
  }

  .card-body {
    padding: 12px;
  }
}
