:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --text: #e5edf7;
  --muted: #94a3b8;
  --dark-text: #172033;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #38bdf8;
  --gold: #facc15;
  --line: rgba(148, 163, 184, 0.2);
  --card: #ffffff;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.22);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--dark-text);
  background: #f7fafc;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  color: #fff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 15px 40px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(18px);
}

.top-nav {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  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.03em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.35);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #67e8f9, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  padding: 12px 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.84);
}

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

.hero-shell {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--bg);
}

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

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

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

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 20%, rgba(34, 211, 238, 0.22), transparent 35%), linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.28) 55%, rgba(2, 6, 23, 0.25));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1280px, 100%);
  transform: translateX(-50%);
  padding: 70px 22px 84px;
  color: #fff;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-content h1,
.hero-content h2 {
  max-width: 850px;
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.36);
}

.hero-text {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(226, 232, 240, 0.92);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

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

.primary-button,
.ghost-button,
.wide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.wide-button {
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.28);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.primary-button:hover,
.ghost-button:hover,
.wide-button:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.52);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(2, 6, 23, 0.82);
  transform: translateY(-50%) scale(1.05);
}

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

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

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

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

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

.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 22px 0;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 30px;
  align-items: center;
}

.home-intro h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-copy h2 {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.home-intro h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.home-intro p:last-child,
.page-hero p,
.category-showcase p,
.detail-one-line,
.detail-copy p {
  color: #475569;
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 150px;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.search-box span {
  color: var(--cyan-dark);
  font-size: 24px;
  line-height: 1;
}

.search-box input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: transparent;
}

.filter-panel select {
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

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

.section-heading h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.section-heading a {
  color: var(--cyan-dark);
  font-weight: 800;
}

.no-link {
  align-items: start;
}

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

.category-tile {
  min-height: 172px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, #0f172a, #1e293b 50%, #075985);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -42px;
  bottom: -42px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.18);
}

.tile-kicker {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-tile small {
  display: block;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.7;
}

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

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

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

.card-link {
  display: block;
  height: 100%;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.2);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #0f172a;
  overflow: hidden;
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.score {
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #fff7ed;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  color: #0f172a;
  background: linear-gradient(135deg, #fde68a, var(--gold));
}

.card-body {
  padding: 15px;
}

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

.card-line {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.card-tags span,
.detail-tags span {
  padding: 4px 9px;
  color: #0e7490;
  background: #ecfeff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border-radius: 26px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.ranking-panel h2,
.ranking-panel .section-heading h2 {
  color: #fff;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 32px 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(3px);
}

.rank-number {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-info strong {
  display: block;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info small {
  color: #94a3b8;
}

.wide-button {
  width: 100%;
  margin-top: 18px;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 78% 0%, rgba(34, 211, 238, 0.23), transparent 30%), linear-gradient(135deg, #020617, #0f172a 52%, #075985);
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 22px 62px;
}

.page-hero h1 {
  max-width: 900px;
  color: #fff;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(226, 232, 240, 0.88);
}

.compact-hero > div {
  padding-bottom: 46px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: #64748b;
  font-size: 14px;
}

.page-hero .breadcrumb {
  color: rgba(226, 232, 240, 0.8);
}

.breadcrumb a {
  color: var(--cyan-dark);
  font-weight: 800;
}

.page-hero .breadcrumb a {
  color: #67e8f9;
}

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

.category-showcase {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 210px;
  padding: 18px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-showcase:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.2);
}

.showcase-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  align-items: end;
}

.showcase-posters img {
  height: 150px;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.showcase-posters img:nth-child(2),
.showcase-posters img:nth-child(4) {
  height: 126px;
}

.category-showcase span {
  color: var(--cyan-dark);
  font-weight: 900;
  font-size: 13px;
}

.category-showcase h2 {
  margin: 8px 0;
  color: #0f172a;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.detail-top {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 22px 24px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin: 8px 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 900px;
  margin-bottom: 20px;
}

.detail-meta span {
  color: #075985;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 22px 0;
}

.player-section h2 {
  margin-bottom: 18px;
  font-size: clamp(26px, 3vw, 38px);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
  cursor: pointer;
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.36);
  font-size: 28px;
}

.play-mask strong {
  font-size: 18px;
}

.player-frame.is-playing .play-mask {
  opacity: 0;
  pointer-events: none;
}

.player-frame.is-loading::after {
  content: "";
  position: absolute;
  left: calc(50% - 18px);
  top: calc(50% - 18px);
  width: 36px;
  height: 36px;
  z-index: 4;
  border: 3px solid rgba(255, 255, 255, 0.34);
  border-top-color: var(--cyan);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-section {
  padding-top: 38px;
}

.detail-copy {
  padding: 34px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-copy h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.detail-copy p {
  margin: 0 0 26px;
}

.detail-copy p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 76px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.5fr) minmax(0, 1fr);
  gap: 30px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 560px;
  color: #94a3b8;
}

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

.footer-links a,
.footer-tags a {
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

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

.footer-bottom {
  padding: 18px 22px;
  text-align: center;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .nav-menu {
    gap: 12px;
    font-size: 14px;
  }

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

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-shell {
    min-height: 76vh;
  }

  .hero-content {
    padding: 48px 20px 76px;
  }

  .hero-control {
    display: none;
  }

  .home-intro,
  .filter-panel,
  .detail-top,
  .footer-inner,
  .category-showcase {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .top-nav {
    height: 62px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .section-block {
    padding: 42px 16px 0;
  }

  .page-hero > div,
  .detail-top,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .card-line,
  .card-tags {
    display: none;
  }

  .poster-wrap {
    border-radius: 0;
  }

  .detail-copy {
    padding: 22px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
  }
}
