:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-strong: #1e293b;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --primary: #38bdf8;
  --primary-deep: #0284c7;
  --accent: #60a5fa;
  --danger: #fb7185;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.38);
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(14, 165, 233, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.20), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
}

.site-header-inner {
  width: min(100% - 32px, var(--container));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.site-logo-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.48);
  font-size: 14px;
}

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

.nav-link {
  position: relative;
  padding: 22px 0;
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 2px;
  border-radius: 99px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-nav .nav-link {
  padding: 9px 0;
}

.mobile-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.mobile-category-links a,
.tag-row span,
.hero-tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(14, 165, 233, 0.10);
  color: #bae6fd;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.mobile-category-links a {
  padding: 8px 10px;
}

.main-shell,
.page-shell,
.detail-shell {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-stage {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  display: grid;
  align-content: center;
  padding: 72px 0;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--primary);
  font-weight: 800;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-title span {
  display: block;
  color: transparent;
  background: linear-gradient(135deg, #ffffff, #bae6fd 45%, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-description {
  max-width: 680px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-tag,
.meta-pill {
  padding: 9px 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.button,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(14, 165, 233, 0.38);
}

.button.secondary {
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(226, 232, 240, 0.16);
  box-shadow: none;
}

.hero-search {
  display: flex;
  width: min(100%, 420px);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.hero-search input {
  min-width: 0;
  flex: 1;
  padding: 0 16px;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
}

.hero-search button {
  border-radius: 0;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - var(--container)) / 2));
  bottom: 42px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 36px;
  background: var(--primary);
}

.section {
  padding: 70px 0;
}

.section.compact {
  padding: 48px 0;
}

.section-band {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.62));
  border-block: 1px solid var(--border);
}

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

.section-heading h2,
.page-hero h1,
.detail-title,
.detail-content h2 {
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p,
.page-hero p,
.category-intro,
.empty-state {
  margin: 8px 0 0;
  color: var(--muted-strong);
}

.section-link {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: 0 26px 80px rgba(8, 47, 73, 0.38);
}

.movie-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.wide-card .movie-cover,
.latest-grid .movie-cover {
  aspect-ratio: 16 / 10;
}

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

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

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

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

.movie-one-line {
  min-height: 44px;
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
}

.movie-meta,
.detail-meta,
.rank-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

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

.tag-row span {
  padding: 6px 8px;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: var(--shadow);
}

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

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

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

.category-card-content {
  position: relative;
  z-index: 1;
}

.category-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 14px;
  color: #dbeafe;
  font-size: 14px;
}

.category-card span {
  color: var(--primary);
  font-weight: 800;
}

.page-hero {
  padding: 64px 0 36px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

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

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

.filter-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 26px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-label {
  color: #ffffff;
  font-weight: 800;
}

.filter-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: 0;
}

.filter-input:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 72px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.38);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  font-weight: 900;
}

.rank-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-main strong {
  color: #ffffff;
  font-size: 17px;
}

.rank-main em {
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta,
.rank-score {
  color: #cbd5e1;
  font-size: 14px;
  white-space: nowrap;
}

.rank-score {
  color: var(--primary);
  font-weight: 900;
}

.detail-shell {
  padding: 34px 0 70px;
}

.player-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  background: #000000;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.player-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(14, 165, 233, 0.42);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-start:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-card.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.detail-panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 48px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.detail-title {
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 52px);
}

.detail-meta {
  margin-bottom: 24px;
}

.meta-pill {
  color: #e0f2fe;
}

.detail-content {
  display: grid;
  gap: 24px;
}

.detail-content h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.detail-content p {
  margin: 0;
  color: #dbeafe;
}

.detail-highlight {
  color: #7dd3fc;
  font-size: 18px;
  font-style: italic;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.78);
}

.site-footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 46px 0 30px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  gap: 28px;
}

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

.site-footer p {
  margin: 0;
  color: var(--muted);
}

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

.footer-links a {
  color: #cbd5e1;
}

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

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

.hidden-by-filter {
  display: none !important;
}

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

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

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

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

  .hero-content {
    align-content: end;
    padding-bottom: 110px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search {
    width: 100%;
  }

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

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

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

  .rank-row {
    grid-template-columns: 44px 58px minmax(0, 1fr);
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }

  .rank-meta,
  .rank-score {
    grid-column: 3;
  }

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

@media (max-width: 540px) {
  .site-header-inner,
  .mobile-nav,
  .main-shell,
  .page-shell,
  .detail-shell,
  .site-footer-inner,
  .footer-copy {
    width: min(100% - 24px, var(--container));
  }

  .hero-title {
    font-size: 44px;
  }

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

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

  .player-start {
    width: 68px;
    height: 68px;
  }
}
