:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #0f172a;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 42%, #f4f7fb 100%);
}

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: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

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

.brand-text strong {
  font-size: 21px;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #334155;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--blue);
  background: #eff6ff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 20px;
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #09111f;
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 620px;
  align-items: center;
}

.hero-slide.is-active {
  display: flex;
}

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
  filter: blur(4px) saturate(1.1);
  opacity: 0.5;
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.6), transparent 30%), linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.48));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding: 78px 0 110px;
  color: #ffffff;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.3);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster {
  position: relative;
  justify-self: center;
  width: min(360px, 82vw);
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.5);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster span,
.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
}

.hero-bottom {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hero-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
}

.search-panel {
  margin-top: -34px;
  position: relative;
  z-index: 20;
  padding: 18px;
  display: grid;
  gap: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.search-box span {
  color: var(--blue);
  font-size: 22px;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
}

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

.filter-row button {
  border: 0;
  padding: 9px 14px;
  border-radius: 999px;
  color: #334155;
  background: #eef2ff;
  cursor: pointer;
}

.filter-row button.is-active,
.filter-row button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.content-section {
  padding: 58px 0 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  color: #0f172a;
}

.section-head p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head a {
  color: var(--blue);
  font-weight: 700;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-link img,
.detail-poster img,
.rank-cover img,
.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

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

.poster-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  color: #ffffff;
  font-size: 12px;
}

.poster-play {
  width: 48px;
  height: 48px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.26);
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.rank-info h2 a:hover {
  color: var(--blue);
}

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

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

.category-strip {
  margin-bottom: 46px;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  padding: 24px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 55%, #06b6d4);
  box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #111827, #7c3aed 55%, #06b6d4);
}

.category-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -50px;
  top: -50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.category-title,
.category-desc {
  position: relative;
  z-index: 2;
  display: block;
}

.category-title {
  font-size: 25px;
  font-weight: 800;
}

.category-desc {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.category-thumbs {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  display: flex;
  gap: 8px;
}

.category-thumbs img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.25);
}

.page-hero {
  position: relative;
  padding: 78px 0;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.45), transparent 28%), linear-gradient(135deg, #0f172a, #1e3a8a 58%, #0891b2);
  overflow: hidden;
}

.page-hero p {
  margin-bottom: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 60px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.rank-cover {
  width: 76px;
  height: 102px;
  overflow: hidden;
  border-radius: 14px;
  background: #e2e8f0;
}

.rank-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--blue);
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.meta-line span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

.rank-action {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 44px 0 70px;
}

.detail-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.48);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  margin-top: -42px;
  position: relative;
  z-index: 8;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.26);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.24), rgba(2, 6, 23, 0.5));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #ffffff;
  font-size: 28px;
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.28);
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 42px;
}

.story-card {
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.story-card h2 {
  margin: 0 0 12px;
  color: #0f172a;
}

.story-card p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.site-footer {
  margin-top: 68px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-grid {
  padding: 48px 0 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 15px;
  color: #ffffff;
  font-size: 17px;
}

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

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

.footer-bottom {
  padding: 18px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-content,
  .detail-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 54px 0 130px;
  }

  .hero-poster {
    width: min(280px, 72vw);
  }

  .hero-bottom {
    display: grid;
    justify-items: start;
  }

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

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .brand-text small {
    display: none;
  }

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

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

  .card-body {
    padding: 12px;
  }

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

  .rank-item {
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }

  .rank-number {
    position: absolute;
    margin-left: 10px;
    margin-top: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #ffffff;
    font-size: 18px;
    background: linear-gradient(135deg, #f97316, #ef4444);
  }

  .rank-info,
  .rank-action {
    grid-column: 2;
  }
}
