:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(96, 165, 250, 0.18);
  --line-strong: rgba(96, 165, 250, 0.34);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --green: #22c55e;
  --yellow: #facc15;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.20), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.14), transparent 28rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 64, 175, 0.26);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: #60a5fa;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.34);
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #60a5fa;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.search-form input,
.mobile-search input,
.filter-input,
.filter-select {
  min-width: 0;
  color: #e2e8f0;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
  width: 250px;
  padding: 10px 16px;
}

.search-form input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.search-form button,
.mobile-search button,
.primary-button,
.ghost-button,
.filter-button,
.player-button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 15px 34px rgba(37, 99, 235, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form button {
  padding: 10px 18px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-weight: 800;
}

.ghost-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-weight: 750;
  border: 1px solid rgba(96, 165, 250, 0.30);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
}

.primary-button:hover,
.ghost-button:hover,
.filter-button:hover,
.search-form button:hover,
.mobile-search button:hover,
.player-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.34);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: #e2e8f0;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(96, 165, 250, 0.13);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 12px 4px;
  color: #cbd5e1;
  font-weight: 700;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding-top: 8px;
}

.mobile-search input {
  flex: 1;
  padding: 10px 14px;
}

.mobile-search button {
  padding: 10px 16px;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(96, 165, 250, 0.14);
  background: #020617;
}

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

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

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

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

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

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 78vh;
  padding: 80px 0 70px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 14px;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 800;
  border: 1px solid rgba(96, 165, 250, 0.30);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0 0 22px;
  color: #ffffff;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 650px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
}

.hero-meta {
  margin-bottom: 30px;
  gap: 18px;
}

.hero-meta span,
.card-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.main-section {
  padding: 74px 0;
}

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

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #60a5fa;
  font-size: 14px;
  font-weight: 850;
}

.section-heading h1,
.section-heading h2,
.page-title h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-title p {
  margin: 10px 0 0;
  max-width: 730px;
  color: var(--muted);
}

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

.movie-card,
.category-card,
.info-panel,
.rank-row,
.player-shell,
.search-panel {
  border: 1px solid rgba(96, 165, 250, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.52));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: var(--shadow);
}

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

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

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

.poster-badge,
.poster-score {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.poster-badge {
  left: 12px;
  top: 12px;
}

.poster-score {
  right: 12px;
  bottom: 12px;
  color: #fde68a;
}

.card-body {
  padding: 18px;
}

.card-meta {
  color: #93c5fd;
  font-size: 13px;
}

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

.card-body h2 a:hover,
.rank-info h2 a:hover,
.text-link:hover {
  color: #60a5fa;
}

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

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

.tag-list span {
  padding: 5px 9px;
  color: #bfdbfe;
  font-size: 12px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.14);
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border-radius: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 21px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.category-card span {
  color: #67e8f9;
  font-weight: 800;
}

.page-title {
  padding: 62px 0 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #93c5fd;
  font-size: 14px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
}

.filter-input {
  flex: 1 1 260px;
  padding: 12px 16px;
}

.filter-select {
  padding: 12px 16px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 160px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.rank-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
}

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

.rank-info h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 21px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding-bottom: 70px;
}

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

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

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.30), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-weight: 900;
  font-size: 18px;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: none;
  padding: 10px 14px;
  color: #fee2e2;
  text-align: center;
  border-radius: 14px;
  background: rgba(127, 29, 29, 0.72);
}

.player-message.is-visible {
  display: block;
}

.detail-content,
.side-card,
.search-panel {
  padding: 24px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

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

.detail-content h2,
.side-card h2,
.search-panel h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
}

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

.detail-meta {
  margin: 16px 0 18px;
  color: #cbd5e1;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.side-card {
  position: sticky;
  top: 92px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: rgba(51, 65, 85, 0.44);
}

.compact-card img {
  width: 96px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card span {
  color: #e2e8f0;
  font-weight: 750;
  line-height: 1.35;
}

.search-panel {
  margin-bottom: 28px;
}

.search-results {
  min-height: 280px;
}

.empty-state {
  padding: 56px 20px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(96, 165, 250, 0.20);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.site-footer {
  padding: 46px 0;
  border-top: 1px solid rgba(96, 165, 250, 0.14);
  background: rgba(2, 6, 23, 0.66);
}

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

.footer-logo {
  margin-bottom: 10px;
  color: #60a5fa;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: var(--soft);
  font-size: 14px;
}

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

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

.footer-links a:hover {
  color: #60a5fa;
}

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

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

  .hero,
  .hero-content {
    min-height: 70vh;
  }

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

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

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

  .side-card {
    position: static;
  }

  .rank-row {
    grid-template-columns: 42px 118px 1fr;
  }

  .rank-row .ghost-button {
    grid-column: 2 / 4;
  }

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

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 16px;
  }

  .main-section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading .ghost-button {
    margin-top: 16px;
  }

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

  .rank-row {
    grid-template-columns: 38px 96px 1fr;
    gap: 12px;
  }

  .rank-poster {
    border-radius: 14px;
  }

  .rank-info h2 {
    font-size: 17px;
  }

  .rank-info p {
    display: none;
  }

  .detail-content,
  .side-card,
  .search-panel {
    padding: 18px;
  }
}
