:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #142033;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --blue-500: #3b82f6;
  --orange-500: #f97316;
  --pink-500: #ec4899;
  --text: #172033;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.25);
  --white: #ffffff;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.35);
}

.brand-name {
  font-size: 20px;
}

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

.nav-link {
  padding: 9px 12px;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
  background: rgba(51, 65, 85, 0.8);
}

.nav-search {
  position: relative;
  width: min(260px, 28vw);
}

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid transparent;
  outline: none;
  border-radius: 999px;
}

.nav-search input {
  color: var(--white);
  background: rgba(51, 65, 85, 0.9);
  padding: 10px 42px 10px 16px;
}

.nav-search input:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.nav-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #cbd5e1;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  color: var(--white);
  background: rgba(51, 65, 85, 0.75);
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--slate-850);
  padding: 12px 16px 18px;
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #e2e8f0;
}

.mobile-nav a:hover {
  background: rgba(51, 65, 85, 0.75);
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.mobile-search input {
  color: var(--white);
  background: rgba(51, 65, 85, 0.9);
  padding: 10px 14px;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  padding: 0 16px;
  cursor: pointer;
}

.hero-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 44px;
  min-height: 70vh;
  padding: 72px 0;
}

.hero-text {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: #075985;
  background: rgba(6, 182, 212, 0.12);
}

.hero-text h1 {
  margin: 22px 0 20px;
  max-width: 820px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-text p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(18px, 2.2vw, 22px);
}

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

.hero-meta span,
.detail-meta span,
.card-meta span {
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  padding: 6px 12px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.25);
}

.btn-glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.btn-outline {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(16px);
  padding: 18px;
}

.hero-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.hero-mini-card img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini-card span {
  font-weight: 700;
  color: #f8fafc;
}

.stat-strip {
  color: var(--white);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-800));
  padding: 34px 0;
}

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

.stat-grid div {
  text-align: center;
}

.stat-grid strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.stat-grid span {
  display: block;
  color: #cbd5e1;
  margin-top: 8px;
}

.section-block {
  padding: 76px 0;
}

.section-slate {
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.soft-gradient {
  background: linear-gradient(180deg, #ffffff, #ecfeff);
}

.section-head {
  max-width: 720px;
  text-align: center;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.section-head.is-light p {
  color: #cbd5e1;
}

.align-left {
  text-align: left;
  margin-left: 0;
}

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

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

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

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

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

.card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--slate-800);
}

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

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

.card-cover figcaption {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.72);
  padding: 5px 10px;
  font-size: 12px;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
}

.card-meta span {
  color: #475569;
  background: #f1f5f9;
  padding: 4px 9px;
  font-size: 12px;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 8px;
  color: #1e293b;
  font-size: 19px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag {
  border-radius: 999px;
  color: #0e7490;
  background: rgba(6, 182, 212, 0.12);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.movie-card.is-compact .card-link {
  display: grid;
  grid-template-columns: 136px 1fr;
}

.movie-card.is-compact .card-cover {
  height: 100%;
  min-height: 136px;
  aspect-ratio: auto;
}

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

.category-entry,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.24), rgba(59, 130, 246, 0.12));
  padding: 24px;
  min-height: 178px;
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-entry:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.6);
}

.category-entry span,
.category-overview-card span {
  display: block;
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-entry em,
.category-overview-card strong {
  display: block;
  position: relative;
  z-index: 2;
  color: #cbd5e1;
  font-style: normal;
  font-weight: 500;
}

.category-overview-card {
  color: var(--white);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.45s ease;
}

.category-overview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.9));
}

.category-overview-card:hover img {
  transform: scale(1.08);
}

.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: start;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 44px 74px 1fr 20px;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow);
}

.rank-number {
  color: var(--cyan-500);
  font-weight: 900;
  font-size: 22px;
}

.ranking-item img {
  width: 74px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rank-content strong {
  overflow: hidden;
  color: #1e293b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content em {
  overflow: hidden;
  color: #64748b;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.rank-arrow {
  color: #94a3b8;
  font-size: 26px;
}

.full-ranking {
  gap: 10px;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: #0891b2;
  font-weight: 800;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 16% 10%, rgba(34, 211, 238, 0.28), transparent 32%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  padding: 78px 0 72px;
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px 170px;
  gap: 12px;
  margin-bottom: 28px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  padding: 14px;
}

.filter-bar input,
.filter-bar select {
  color: #1e293b;
  background: #f8fafc;
  border-color: #e2e8f0;
  padding: 12px 15px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
  padding: 38px 0 70px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.76));
}

.detail-wrap {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 30px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
}

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

.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 19px;
}

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

.player-section {
  padding-bottom: 32px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--slate-950);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--white);
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.32);
  font-size: 30px;
  padding-left: 5px;
}

.play-overlay strong {
  font-size: 20px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.article-card,
.side-card {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  padding: 26px;
}

.article-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 25px;
}

.article-card p {
  margin: 0 0 24px;
  color: #475569;
  font-size: 17px;
}

.article-card p:last-child {
  margin-bottom: 0;
}

.side-card dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 11px 14px;
  margin: 0;
}

.side-card dt {
  color: #64748b;
}

.side-card dd {
  margin: 0;
  color: #1e293b;
  font-weight: 700;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
  padding: 56px 0 26px;
}

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

.footer-brand {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 540px;
  margin: 0;
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 20px;
  color: #94a3b8;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-search {
    width: min(260px, 44vw);
    margin-left: auto;
  }

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

  .hero-panel {
    max-width: 520px;
  }

  .movie-grid,
  .featured-grid,
  .library-grid,
  .category-entry-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .nav-search {
    display: none;
  }

  .hero-section,
  .hero-content {
    min-height: auto;
  }

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

  .hero-overlay {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.76));
  }

  .stat-grid,
  .movie-grid,
  .featured-grid,
  .library-grid,
  .compact-grid,
  .category-entry-grid,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-item {
    grid-template-columns: 36px 62px 1fr 16px;
    gap: 10px;
    padding: 9px;
  }

  .ranking-item img {
    width: 62px;
    height: 48px;
  }

  .movie-card.is-compact .card-link {
    grid-template-columns: 120px 1fr;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 18px;
  }

  .hero-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .section-block {
    padding: 54px 0;
  }

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

  .movie-card.is-compact .card-link {
    display: flex;
  }
}
