:root {
  --bg-deep: #020617;
  --bg-blue: #0f1d45;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(251, 191, 36, 0.35);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --orange: #f97316;
  --rose: #fb7185;
  --blue: #38bdf8;
  --green: #2dd4bf;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow-amber: 0 20px 60px rgba(245, 158, 11, 0.28);
  --shadow-card: 0 18px 60px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 32rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f1d45 42%, #111827 100%);
}

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-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.42);
}

.brand-name,
.footer-logo {
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-name {
  font-size: 21px;
  white-space: nowrap;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 14px;
  color: #dbeafe;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(249, 115, 22, 0.92));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.06) 52%, rgba(2, 6, 23, 0.72));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 1180px;
  padding: 80px 0 120px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #fcd34d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  width: min(800px, 100%);
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.065em;
  background: linear-gradient(90deg, #fef3c7, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(25px, 3vw, 44px);
  line-height: 1.15;
}

.hero-desc {
  width: min(700px, 100%);
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #e2e8f0;
  backdrop-filter: blur(10px);
}

.hero-tags span,
.detail-tags span {
  padding: 8px 13px;
}

.card-tags span {
  padding: 5px 9px;
  font-size: 12px;
}

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

.btn-primary,
.btn-ghost,
.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: var(--shadow-amber);
}

.btn-primary:hover,
.btn-small:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 64px rgba(249, 115, 22, 0.34);
}

.btn-ghost {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.btn-small {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(249, 115, 22, 0.95));
}

.hero-panel {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  z-index: 5;
  width: min(420px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow-card);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.hero-search {
  display: flex;
  gap: 10px;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.58);
}

.hero-search input {
  min-height: 46px;
  padding: 0 14px;
}

.hero-search button,
.filter-clear {
  border: 0;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.hero-search button {
  min-width: 76px;
}

.hero-mini-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

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

.hero-dot {
  width: 32px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.section {
  padding: 64px 0;
}

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

.section-head h2,
.page-title h1,
.rank-head h2,
.detail-info h1,
.content-card h2 {
  margin: 0;
  letter-spacing: -0.045em;
}

.section-head h2,
.page-title h1,
.rank-head h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-head a {
  color: #fcd34d;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.78));
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 74px rgba(2, 6, 23, 0.58);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.5);
}

.poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster {
  transform: scale(1.06);
  filter: saturate(1.15);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.9);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.3);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: #fcd34d;
}

.card-meta,
.card-desc {
  margin: 8px 0 0;
  color: var(--soft);
  line-height: 1.62;
}

.card-meta {
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags {
  margin-top: 12px;
}

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

.category-tile,
.category-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  filter: brightness(1.06);
}

.category-tile span,
.category-card-title {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.category-tile strong,
.category-card p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.65;
}

.category-card {
  padding: 22px;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.category-card-links {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.category-card-links a {
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card-links a:hover {
  color: #fcd34d;
}

.tile-1 {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.92), rgba(244, 63, 94, 0.86));
}

.tile-2 {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(220, 38, 38, 0.86));
}

.tile-3 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(6, 182, 212, 0.86));
}

.tile-4 {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.92), rgba(20, 184, 166, 0.86));
}

.tile-5 {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.92), rgba(99, 102, 241, 0.86));
}

.tile-6 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(249, 115, 22, 0.86));
}

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

.rank-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow-card);
  padding: 22px;
  backdrop-filter: blur(16px);
}

.sticky-rank {
  position: sticky;
  top: 88px;
}

.rank-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  background: rgba(245, 158, 11, 0.16);
  transform: translateX(4px);
}

.rank-num {
  color: #fcd34d;
  font-weight: 950;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 760;
}

.rank-meta {
  color: var(--soft);
  font-size: 13px;
}

.page-hero-space {
  padding-top: 46px;
}

.page-title {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 58, 138, 0.42));
  box-shadow: var(--shadow-card);
  padding: 36px;
}

.page-title p:last-child {
  max-width: 860px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 96px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  padding: 0 14px;
}

.filter-clear {
  min-height: 48px;
}

.detail-page {
  padding-top: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0;
  color: var(--soft);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.35));
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.detail-poster-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 820px;
  margin: 20px 0 0;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.8;
}

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

.player-section {
  padding-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 9;
}

.movie-player,
.play-cover,
.play-cover img,
.play-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: #000;
}

.play-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #fff;
  cursor: pointer;
  background: #000;
}

.play-cover.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-cover img {
  object-fit: cover;
  filter: brightness(0.72) saturate(1.08);
}

.play-mask {
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.24), rgba(2, 6, 23, 0.48) 38%, rgba(2, 6, 23, 0.78));
}

.play-icon {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 6px;
  border-radius: 50%;
  color: #fff;
  font-size: 38px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 24px 80px rgba(245, 158, 11, 0.48);
}

.play-text {
  position: relative;
  z-index: 3;
  margin-top: 132px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

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

.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.content-card h2 {
  margin-bottom: 16px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.detail-neighbors {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
}

.detail-neighbors a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.detail-neighbors a:hover {
  border-color: var(--line-strong);
  background: rgba(245, 158, 11, 0.15);
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.96));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  text-align: center;
  color: var(--soft);
}

.footer-logo {
  display: inline-flex;
  margin-bottom: 12px;
  font-size: 22px;
}

.footer-inner p {
  margin: 8px 0 0;
}

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

@media (max-width: 1040px) {
  .movie-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .sticky-rank {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 11px 0;
  }

  .brand-name {
    max-width: calc(100vw - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-menu {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: 8px;
  }

  .nav-menu.open {
    display: grid;
  }

  .nav-link {
    text-align: center;
  }

  .hero,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    justify-content: flex-start;
    padding-top: 72px;
  }

  .hero-panel {
    left: 16px;
    right: 16px;
    bottom: 24px;
    width: auto;
  }

  .hero-search,
  .filter-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-search button,
  .filter-clear {
    min-height: 46px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-title {
    min-height: 42px;
    font-size: 16px;
  }

  .card-desc {
    min-height: 46px;
    font-size: 13px;
  }

  .page-title {
    padding: 26px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .detail-poster-wrap {
    width: min(310px, 100%);
    margin: 0 auto;
  }

  .play-icon {
    width: 76px;
    height: 76px;
    font-size: 32px;
  }

  .play-text {
    margin-top: 112px;
  }
}

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .detail-actions {
    width: 100%;
  }

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

  .rank-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}
