:root {
  --color-deep-blue: #0f1419;
  --color-night-blue: #1a1f35;
  --color-slate-blue: #2a3347;
  --color-silver: #c0c0c0;
  --color-silver-light: #e8e8e8;
  --color-muted: #9ca3af;
  --color-text: #e2e8f0;
  --color-card: rgba(15, 23, 42, 0.72);
  --color-border: rgba(148, 163, 184, 0.18);
  --gradient-moonlight: linear-gradient(180deg, #0f1419 0%, #1a1f35 48%, #2a3347 100%);
  --gradient-silver: linear-gradient(135deg, #f8fafc 0%, #c0c0c0 45%, #94a3b8 100%);
  --shadow-glow: 0 0 30px rgba(192, 192, 192, 0.25);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--gradient-moonlight);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 18% 8%, rgba(192, 192, 192, 0.12), transparent 30%),
    radial-gradient(circle at 82% 22%, rgba(56, 189, 248, 0.10), transparent 28%),
    linear-gradient(135deg, rgba(15, 20, 25, 0.97), rgba(15, 23, 42, 0.92));
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 85%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.text-gradient {
  background: var(--gradient-silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 20, 25, 0.82);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-glow);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 15px;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #ffffff;
}

.header-search {
  position: relative;
  display: flex;
  min-width: 260px;
}

.header-search input,
.search-box input,
.filter-box input,
.filter-box select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  padding: 10px 16px;
}

.header-search input:focus,
.search-box input:focus,
.filter-box input:focus,
.filter-box select:focus {
  border-color: rgba(226, 232, 240, 0.58);
  box-shadow: 0 0 0 4px rgba(192, 192, 192, 0.10);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.mobile-nav {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-nav a {
  color: #cbd5e1;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(2, 6, 23, 0.96));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transform: scale(1.04);
}

.hero-media img.image-missing {
  display: none;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(15, 20, 25, 0.98) 0%, rgba(15, 20, 25, 0.72) 45%, rgba(15, 20, 25, 0.32) 100%),
    linear-gradient(0deg, rgba(15, 20, 25, 1) 0%, transparent 38%);
}

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

.hero-kicker,
.kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 7px 13px;
  color: #dbeafe;
  font-size: 13px;
}

.hero-title {
  max-width: 820px;
  margin: 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-description {
  max-width: 680px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.button-primary {
  background: var(--gradient-silver);
  color: #0f1419;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  box-shadow: var(--shadow-card);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
}

.hero-poster img.image-missing {
  display: none;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  color: rgba(226, 232, 240, 0.72);
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.08em;
}

.hero-poster-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  padding: 16px;
  backdrop-filter: blur(16px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  padding: 0;
}

.hero-dot.is-active {
  width: 32px;
  background: #e2e8f0;
}

.page-hero {
  padding: 72px 0 32px;
}

.page-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
}

.page-description {
  max-width: 820px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
}

.section-heading p {
  margin: 8px 0 0;
  color: #94a3b8;
}

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

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

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

.movie-card,
.category-card,
.glass-card,
.ranking-row,
.detail-panel {
  border: 1px solid var(--color-border);
  background: var(--color-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.movie-card,
.category-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(226, 232, 240, 0.32);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(15, 23, 42, 1));
}

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

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

.poster-frame img.image-missing {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  padding: 0 9px;
  color: #f8fafc;
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.poster-frame .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--gradient-silver);
  color: #0f1419;
  font-weight: 900;
}

.movie-card-body {
  padding: 15px;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 0;
  overflow: hidden;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 12px;
}

.card-meta span {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.10);
  padding: 4px 8px;
}

.category-card {
  position: relative;
  min-height: 168px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(192, 192, 192, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
}

.category-card h3 {
  margin: 0;
  font-size: 22px;
}

.category-card p {
  margin: 10px 0 0;
  color: #94a3b8;
  line-height: 1.7;
}

.category-card strong {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: rgba(226, 232, 240, 0.26);
  font-size: 48px;
}

.filter-box,
.search-box {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin: 26px 0 32px;
}

.search-box {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.filter-box input,
.filter-box select,
.search-box input {
  min-height: 48px;
  padding: 0 16px;
}

.search-box button {
  border: 0;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-radius: 20px;
  padding: 12px;
}

.ranking-index {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: var(--gradient-silver);
  color: #0f1419;
  font-weight: 900;
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  width: 74px;
  height: 96px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(15, 23, 42, 1));
}

.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-poster img.image-missing {
  display: none;
}

.ranking-info h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
}

.ranking-info p {
  margin: 6px 0 0;
  color: #94a3b8;
  line-height: 1.6;
}

.ranking-score {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

.player-card {
  overflow: hidden;
  border-radius: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.64));
  color: #ffffff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: var(--gradient-silver);
  color: #0f1419;
  font-size: 34px;
  font-weight: 900;
  box-shadow: var(--shadow-glow);
}

.player-status {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
  padding: 10px 12px;
  color: #cbd5e1;
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.detail-panel {
  border-radius: 24px;
  padding: 24px;
}

.detail-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.12;
}

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

.detail-meta span,
.tag-list span {
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
  color: #dbeafe;
  font-size: 13px;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2,
.detail-section h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.detail-section p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.side-cover {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(15, 23, 42, 1));
}

.side-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-cover img.image-missing {
  display: none;
}

.footer {
  margin-top: 64px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 20, 25, 0.72);
  padding: 46px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer p,
.footer a {
  color: #94a3b8;
  line-height: 1.8;
}

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

.result-empty {
  border: 1px dashed rgba(226, 232, 240, 0.20);
  border-radius: 22px;
  padding: 34px;
  color: #cbd5e1;
  text-align: center;
}

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

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

  .hero-poster {
    min-height: 380px;
  }

  .hero-poster img {
    min-height: 380px;
  }
}

@media (max-width: 820px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: grid;
  }

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

  .filter-box,
  .search-box {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .ranking-score {
    display: none;
  }

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

  .hero-content {
    padding-top: 56px;
  }
}

@media (max-width: 520px) {
  .section-container {
    width: min(100% - 22px, 1280px);
  }

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

  .movie-card-body {
    padding: 12px;
  }

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

  .hero-poster {
    min-height: 320px;
  }

  .hero-poster img {
    min-height: 320px;
  }
}
