:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-solid: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --blue: #2563eb;
  --yellow: #facc15;
  --shadow-cyan: 0 18px 50px rgba(34, 211, 238, 0.18);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 5%, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(37, 99, 235, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

body.is-nav-open {
  overflow: hidden;
}

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: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.site-logo__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: var(--shadow-cyan);
}

.site-logo__text {
  font-size: 18px;
}

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

.site-nav a {
  padding: 10px 14px;
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

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

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

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

.hero-slide__shade {
  position: absolute;
  inset: 0;
}

.hero-slide__shade--left {
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 38%, transparent 100%);
}

.hero-slide__shade--bottom {
  background: linear-gradient(0deg, #020617 0%, transparent 48%);
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
}

.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero-slide h1,
.page-hero h1,
.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-slide p,
.page-hero p,
.detail-info p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.hero-slide__meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.hero-slide__meta {
  margin: 24px 0;
}

.hero-slide__meta span:first-child,
.detail-meta span:first-child {
  color: var(--yellow);
  font-weight: 800;
}

.hero-slide__actions,
.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: var(--shadow-cyan);
}

.btn-secondary {
  color: #dffbff;
  background: rgba(34, 211, 238, 0.13);
  border: 1px solid rgba(34, 211, 238, 0.26);
}

.btn-ghost {
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn-full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  font-size: 34px;
  cursor: pointer;
}

.hero-arrow--prev {
  left: 18px;
}

.hero-arrow--next {
  right: 18px;
}

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

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: var(--cyan);
}

.page-main {
  padding: 38px 0 0;
}

.section {
  padding: 56px 0;
}

.section--after-hero {
  margin-top: -26px;
  position: relative;
  z-index: 5;
}

.panel-section,
.category-overview-card,
.text-card,
.side-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.62));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.panel-section {
  padding: 40px;
}

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

.section-heading__line {
  width: 5px;
  height: 34px;
  display: inline-block;
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-heading h2 {
  display: inline-block;
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.search-panel,
.filter-bar {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(14px);
}

.search-panel input,
.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.search-panel input,
.filter-bar input {
  flex: 1 1 auto;
  padding: 0 16px;
}

.filter-bar select {
  min-width: 148px;
  padding: 0 12px;
}

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

.category-tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.movie-row:hover,
.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: var(--shadow-cyan);
}

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

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

.category-tile__body {
  padding: 16px;
}

.category-tile h3,
.movie-card h3,
.movie-row h3,
.rank-row h2 {
  margin: 0;
}

.category-tile p,
.movie-card p,
.movie-row p,
.rank-row p {
  color: var(--muted);
  line-height: 1.6;
}

.category-tile span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card__cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(37, 99, 235, 0.12));
}

.movie-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.movie-card__score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 900;
}

.movie-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #fff;
  font-size: 40px;
  background: rgba(2, 6, 23, 0.35);
  transition: opacity 0.2s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
}

.movie-card__body {
  padding: 14px;
}

.movie-card h3 {
  min-height: 44px;
  color: #fff;
  font-size: 16px;
  line-height: 1.38;
}

.movie-card p {
  min-height: 68px;
  margin: 8px 0 12px;
  font-size: 13px;
}

.movie-card__tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.movie-card__tags span,
.tag-list span {
  padding: 4px 8px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
  font-size: 12px;
}

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

.movie-row,
.rank-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-row {
  padding: 10px;
}

.movie-row img {
  width: 120px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.movie-row__body {
  min-width: 0;
}

.movie-row h3,
.rank-row h2 {
  color: #fff;
  font-size: 17px;
}

.movie-row p,
.rank-row p {
  margin: 6px 0;
  font-size: 13px;
}

.page-hero {
  overflow: hidden;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 211, 238, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.72));
}

.page-hero--small h1,
.page-hero--category h1 {
  font-size: clamp(36px, 5vw, 56px);
}

.category-overview-list {
  display: grid;
  gap: 24px;
  padding: 42px 0 70px;
}

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

.category-overview-card__head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-overview-card__head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

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

.category-stat {
  min-width: 132px;
  padding: 14px;
  border-radius: 16px;
  text-align: right;
  background: rgba(34, 211, 238, 0.08);
}

.category-stat strong {
  display: block;
  color: #fff;
  font-size: 30px;
}

.category-stat span {
  color: var(--muted);
  font-size: 13px;
}

.result-count {
  margin: 18px 0;
  color: var(--muted-strong);
}

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

.rank-row {
  padding: 12px 16px;
}

.rank-row__num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #fff;
  background: rgba(148, 163, 184, 0.14);
  font-weight: 900;
}

.rank-row__num--top {
  background: linear-gradient(135deg, var(--yellow), #f97316);
}

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

.rank-row__body {
  min-width: 0;
  flex: 1 1 auto;
}

.rank-row__weight {
  color: #67e8f9;
}

.detail-main {
  padding-bottom: 64px;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.08);
  transform: scale(1.05);
}

.detail-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.9) 45%, rgba(2, 6, 23, 0.54) 100%),
    linear-gradient(0deg, #020617 0%, transparent 45%);
}

.detail-hero__inner {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  padding: 42px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.breadcrumb a {
  color: #a5f3fc;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: -42px;
  position: relative;
  z-index: 3;
}

.detail-content,
.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 20px;
}

.player-card,
.text-card,
.side-card {
  padding: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 28px;
  box-shadow: var(--shadow-cyan);
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.source-tab {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.08);
  cursor: pointer;
}

.source-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.text-card h2,
.side-card h2 {
  margin: 0 0 14px;
}

.text-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

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

.side-card dd {
  margin: 0;
  color: #fff;
}

.side-card a {
  color: #a5f3fc;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-logo {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer h2 {
  margin: 0 0 12px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  font-size: 16px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--muted-strong);
}

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

[data-card].is-hidden {
  display: none !important;
}

.section-more {
  margin-top: 28px;
  text-align: center;
}

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

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

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

@media (max-width: 820px) {
  .site-nav {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .nav-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-slide__content {
    justify-content: end;
    padding-bottom: 92px;
  }

  .hero-slide h1,
  .detail-info h1 {
    font-size: 40px;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-grid,
  .large-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .filter-bar,
  .category-overview-card__head {
    flex-direction: column;
  }

  .page-hero,
  .panel-section {
    padding: 28px;
  }

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

  .detail-poster {
    width: 220px;
  }

  .rank-row {
    align-items: flex-start;
  }

  .rank-row__weight {
    display: none;
  }
}

@media (max-width: 520px) {
  .container,
  .site-header__inner,
  .hero-slide__content {
    width: min(100% - 22px, 1180px);
  }

  .movie-card h3 {
    min-height: 0;
  }

  .movie-card p,
  .movie-card__tags {
    display: none;
  }

  .movie-row,
  .rank-row {
    gap: 10px;
  }

  .rank-row img {
    width: 72px;
    height: 96px;
  }

  .rank-row__num {
    width: 34px;
    height: 34px;
  }

  .detail-poster {
    width: 180px;
  }
}
