:root {
  --bg: #0f172a;
  --bg-soft: #111c31;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: #243047;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --orange: #fb923c;
  --green: #4ade80;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.12), transparent 32rem),
    radial-gradient(circle at 85% 2%, rgba(59, 130, 246, 0.12), transparent 36rem),
    linear-gradient(180deg, #0f172a 0%, #111827 46%, #0f172a 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.32);
  font-size: 15px;
}

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

.desktop-nav a,
.nav-drop > a {
  color: var(--muted-strong);
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-drop > a.active {
  color: var(--cyan);
}

.nav-drop {
  position: relative;
  padding: 24px 0;
}

.drop-menu {
  position: absolute;
  top: 60px;
  left: 50%;
  width: 190px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.nav-drop:hover .drop-menu {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.drop-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted-strong);
}

.drop-menu a:hover {
  background: rgba(30, 41, 59, 0.92);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.72);
  color: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav a,
.mobile-nav-title {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted-strong);
}

.mobile-nav a:hover {
  color: var(--cyan);
  background: rgba(30, 41, 59, 0.72);
}

.mobile-nav-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-poster {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 640px;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(8px);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.78) 38%, rgba(15, 23, 42, 0.08) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.9) 0%, transparent 42%);
}

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

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

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  max-width: 760px;
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
}

.hero-content p {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 20px;
  line-height: 1.75;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  color: #06202a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 20px 46px rgba(34, 211, 238, 0.22);
}

.ghost-btn,
.section-more {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.72);
  backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.38);
}

.hero-dot.active {
  width: 34px;
  background: var(--cyan);
}

.home-search {
  margin-top: -48px;
  position: relative;
  z-index: 10;
}

.search-panel,
.filter-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-panel {
  padding: 22px;
}

.search-panel label,
.filter-search label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-strong);
  font-weight: 800;
}

.search-line {
  display: flex;
  gap: 12px;
}

.search-line input,
.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.84);
}

.search-line input {
  flex: 1;
  padding: 0 16px;
}

.search-line button,
.filter-selects button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  color: #06202a;
  background: var(--cyan);
  font-weight: 900;
}

.content-section {
  margin-top: 72px;
}

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

.section-head h2,
.ranking-card h2,
.ranking-page-list h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.46);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #020617;
}

.movie-card.small .poster-link {
  aspect-ratio: 16 / 9;
}

.movie-card.large .poster-link {
  aspect-ratio: 16 / 9;
}

.movie-card.wide .poster-link {
  aspect-ratio: 18 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(2, 6, 23, 0.85));
  opacity: 0.78;
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(34, 211, 238, 0.86);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: all 0.25s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.type-badge,
.cat-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.66);
  backdrop-filter: blur(8px);
}

.type-badge {
  left: 12px;
  background: rgba(251, 146, 60, 0.88);
}

.cat-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  top: auto;
  bottom: 12px;
  background: rgba(34, 211, 238, 0.88);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span:nth-child(2) {
  color: var(--cyan);
}

.category-panel {
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.58);
}

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

.category-tile {
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.08));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 20px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

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

.ranking-card,
.side-card,
.detail-panel,
.filter-panel,
.category-overview-card,
.ranking-page-list {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.76);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.ranking-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.ranking-card ol,
.ranking-page-list ol {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ranking-card li + li,
.ranking-page-list li + li {
  margin-top: 12px;
}

.ranking-card li a,
.ranking-page-list li a {
  display: grid;
  grid-template-columns: 34px 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.ranking-card li a:hover,
.ranking-page-list li a:hover {
  background: rgba(15, 23, 42, 0.56);
}

.ranking-card img,
.ranking-page-list img {
  width: 82px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #082f49;
  background: var(--cyan);
  font-weight: 900;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy strong {
  color: #fff;
}

.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-main {
  padding-top: 36px;
}

.page-hero {
  padding: 54px 0 42px;
}

.page-hero p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 19px;
}

.small-actions {
  margin-top: 20px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 20px;
}

.filter-panel input {
  width: 100%;
  padding: 0 14px;
}

.filter-selects {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-panel select {
  padding: 0 38px 0 14px;
}

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

.category-overview-card {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
}

.category-overview-copy h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.category-overview-copy h2 a:hover {
  color: var(--cyan);
}

.category-overview-copy p:not(.eyebrow) {
  color: var(--muted-strong);
}

.ranking-page-list {
  padding: 24px;
}

.ranking-page-list ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

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

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

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

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.7));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.88);
  box-shadow: 0 0 42px rgba(34, 211, 238, 0.34);
  font-size: 34px;
  padding-left: 6px;
}

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

.detail-panel {
  margin-top: 22px;
  padding: 24px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

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

.detail-meta span,
.detail-meta a,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: var(--muted-strong);
  font-size: 13px;
}

.detail-meta a,
.detail-tags span:nth-child(3n + 1) {
  color: var(--cyan);
}

.one-line {
  margin: 22px 0;
  color: var(--muted-strong);
  font-size: 19px;
  font-style: italic;
}

.prose-panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.prose-panel h2:not(:first-child) {
  margin-top: 26px;
}

.prose-panel p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.85;
}

.detail-side {
  position: sticky;
  top: 96px;
}

.side-card {
  padding: 18px;
}

.side-poster {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 18px;
}

.side-card h2 {
  margin: 0 0 14px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.4);
  transition: background 0.2s ease;
}

.related-item:hover {
  background: rgba(15, 23, 42, 0.78);
}

.related-item img {
  width: 104px;
  height: 66px;
  object-fit: cover;
  border-radius: 10px;
}

.related-item strong,
.related-item em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-item strong {
  color: #fff;
}

.related-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

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

.footer-grid p {
  max-width: 430px;
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

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

  .split-section,
  .detail-layout,
  .category-overview-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card,
  .detail-side {
    position: static;
  }
}

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

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

  .nav-shell {
    height: 64px;
  }

  .brand {
    font-size: 20px;
  }

  .hero,
  .hero-content,
  .hero-poster img {
    min-height: 620px;
  }

  .hero-backdrop {
    grid-template-columns: 1fr;
  }

  .hero-poster:nth-child(n + 2) {
    display: none;
  }

  .hero-content p {
    font-size: 17px;
  }

  .home-search {
    margin-top: -26px;
  }

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

  .featured-grid,
  .hot-grid,
  .latest-grid,
  .catalog-grid,
  .wide-grid,
  .mini-grid,
  .category-grid,
  .ranking-page-list ol {
    grid-template-columns: 1fr;
  }

  .content-section {
    margin-top: 48px;
  }

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

  .category-panel {
    padding: 20px;
  }

  .ranking-card li a,
  .ranking-page-list li a {
    grid-template-columns: 30px 76px minmax(0, 1fr);
  }

  .detail-panel {
    padding: 20px;
  }

  .player-overlay span {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

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

  .related-item img {
    width: 92px;
    height: 58px;
  }
}
