:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #2563eb;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(37, 99, 235, 0.16), transparent 38rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
}

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

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

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

.brand-text strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand-text small {
  color: rgba(34, 211, 238, 0.82);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: var(--soft);
  font-weight: 650;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select,
.search-page-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.header-search input {
  padding: 9px 6px 9px 14px;
  font-size: 14px;
}

.header-search button,
.mobile-search button,
.search-page-box button,
.primary-button,
.play-button {
  border: 0;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.22);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-box button:hover,
.primary-button:hover,
.play-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.3);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 20px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.mobile-link.is-active {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.3);
}

.mobile-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
}

.mobile-search input {
  padding: 8px;
}

.mobile-search button {
  border-radius: 14px;
  padding: 8px 14px;
}

.hero {
  position: relative;
  min-height: 85vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

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

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

.hero-media img.image-missing {
  opacity: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.58) 42%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.55) 44%, rgba(2, 6, 23, 0.24) 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 104px;
}

.hero-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-kicker span,
.detail-kicker span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  background: rgba(34, 211, 238, 0.24);
  border: 1px solid rgba(34, 211, 238, 0.42);
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  color: var(--text);
  font-weight: 800;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(16px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 38px;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 4px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.32);
}

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

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

.page-main {
  padding: 56px 0 76px;
}

.section-block {
  margin-top: 54px;
}

.section-block:first-child {
  margin-top: 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  min-width: max-content;
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  display: grid;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.25;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(34, 211, 238, 0.16), transparent 16rem),
    rgba(15, 23, 42, 0.95);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.2s ease;
}

.poster-frame img.image-missing {
  opacity: 0;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.64)),
    linear-gradient(45deg, rgba(34, 211, 238, 0.1), transparent 54%);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border-radius: 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.play-dot {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(34, 211, 238, 0.88);
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.34);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  min-height: 1.3em;
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
}

.card-body em {
  color: var(--cyan);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}

.card-body small {
  min-height: 3.2em;
  color: var(--muted);
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 26px;
}

.tag-row span,
.meta-chip {
  padding: 5px 8px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 12px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.category-tile {
  min-height: 158px;
  display: grid;
  align-content: end;
  padding: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.26), transparent 9rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.76));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 180deg, transparent, rgba(34, 211, 238, 0.18), transparent);
  opacity: 0;
  transition: opacity 0.24s ease;
}

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

.category-tile:hover::before {
  opacity: 1;
}

.category-tile strong,
.category-tile span {
  position: relative;
}

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

.category-tile span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.38);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: rgba(34, 211, 238, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.rank-row strong {
  display: block;
  font-size: 17px;
}

.rank-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

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

.filters {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 26px 0 24px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-input,
.filter-select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-select {
  appearance: none;
}

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

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 30px;
  align-items: stretch;
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 22rem),
    rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 3 / 4.25;
  background: rgba(2, 6, 23, 0.62);
}

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

.detail-poster img.image-missing {
  opacity: 0;
}

.detail-info {
  display: grid;
  align-content: center;
  gap: 18px;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-info p {
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.player-section,
.content-panel,
.related-panel {
  margin-top: 28px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.16);
}

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

.player-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.26)),
    radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.22), transparent 18rem);
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-button {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  font-size: 30px;
  padding-left: 6px;
}

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

.content-panel h2,
.related-panel h2,
.player-section h2 {
  margin: 0 0 16px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.content-panel p {
  margin: 0 0 18px;
  color: var(--soft);
  line-height: 1.9;
  font-size: 16px;
}

.search-page-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 26px 0 28px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.search-page-box input {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.search-page-box button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
}

.empty-state {
  display: none;
  padding: 26px;
  border-radius: 22px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.footer-brand {
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  color: var(--soft);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

@media (max-width: 1060px) {
  .header-search {
    display: none;
  }

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

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

  .rank-panel,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding: 96px 0 82px;
  }

  .hero p {
    font-size: 16px;
  }

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

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

  .hero-dots {
    bottom: 24px;
  }

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

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

  .filters {
    grid-template-columns: 1fr;
  }

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

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

  .rank-score {
    grid-column: 2;
  }

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

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

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

  .detail-hero,
  .player-section,
  .content-panel,
  .related-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .play-button {
    width: 70px;
    height: 70px;
  }
}
