:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c33;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --blue-light: #38bdf8;
  --cyan: #22d3ee;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.2), transparent 32rem),
    radial-gradient(circle at 90% 18%, rgba(34, 211, 238, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.navbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted-strong);
  padding: 9px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.nav-search {
  width: 268px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.5);
}

.nav-search input {
  min-width: 0;
  flex: 1;
  padding: 8px 4px 8px 12px;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.nav-search button,
.btn,
.filter-bar button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button {
  padding: 7px 13px;
}

.nav-search button:hover,
.btn:hover,
.filter-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
  background: #1d4ed8;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #ffffff;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.hero-stage {
  position: relative;
  min-height: 600px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 720px;
}

.hero-pill,
.detail-pill,
.card-badge,
.category-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.95);
  color: #ffffff;
  font-weight: 700;
}

.hero-pill {
  padding: 7px 14px;
  margin-bottom: 18px;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-one-line {
  max-width: 760px;
  margin: 0 0 10px;
  color: var(--muted-strong);
  font-size: 20px;
}

.hero-summary {
  max-width: 690px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 16px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 800;
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue), #0284c7);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn.ghost:hover {
  background: rgba(30, 41, 59, 0.92);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: max(16px, calc((100% - 1180px) / 2));
}

.hero-next {
  right: max(16px, calc((100% - 1180px) / 2));
}

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

.hero-dot {
  width: 30px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--blue-light);
}

.hero-thumbs {
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: -86px;
  padding-bottom: 34px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.hero-thumb img {
  width: 56px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  padding: 54px 0;
}

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

.page-head {
  align-items: flex-start;
  padding: 54px 0 18px;
}

.section-head h2,
.page-head h1 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.section-head p,
.page-head p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: var(--blue-light);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(56, 189, 248, 0.46);
  background: rgba(17, 28, 51, 0.92);
  transform: translateY(-5px);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  font-size: 12px;
}

.card-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 800;
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
  display: block;
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-desc {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  margin-top: 6px;
  color: var(--blue-light);
  font-size: 12px;
  white-space: nowrap;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  transform: translateY(-4px);
}

.category-previews {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 120px;
  overflow: hidden;
  background: #0f172a;
}

.category-previews img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.category-info {
  display: block;
  padding: 16px;
}

.category-info strong,
.category-info em,
.category-info small {
  display: block;
}

.category-info strong {
  color: #ffffff;
  font-size: 20px;
}

.category-info em {
  color: var(--blue-light);
  font-style: normal;
  font-weight: 800;
}

.category-info small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item strong {
  color: #ffffff;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  outline: none;
}

.filter-bar button {
  padding: 0 18px;
  font-weight: 800;
}

.filter-status {
  margin: -14px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-size: cover;
  background-position: center;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.77), rgba(2, 6, 23, 0.95)),
    linear-gradient(0deg, var(--bg), transparent 52%);
  backdrop-filter: blur(2px);
}

.detail-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: 52px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

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

.breadcrumbs a {
  color: var(--blue-light);
}

.detail-info h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

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

.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
}

.detail-intro {
  max-width: 820px;
  color: var(--muted-strong);
  font-size: 18px;
}

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

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2), rgba(0, 0, 0, 0.38));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
  font-size: 34px;
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.36);
}

.player-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 0 0 54px;
}

.article-card,
.side-card,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.18);
}

.article-card {
  padding: 28px;
}

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

.article-card p {
  color: var(--muted-strong);
  font-size: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.side-card {
  padding: 18px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong,
.side-link span {
  display: block;
}

.side-link strong {
  color: #ffffff;
  font-size: 14px;
}

.side-link span {
  color: var(--muted);
  font-size: 12px;
}

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

.search-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-panel input {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
}

.search-panel button {
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
}

.site-footer a {
  display: block;
  margin-top: 8px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

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

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

@media (max-width: 860px) {
  .navbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.92);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-search {
    order: 3;
    width: 100%;
  }

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

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    bottom: 28px;
  }

  .hero-thumbs {
    display: none;
  }

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

  .category-grid,
  .rank-list,
  .content-grid,
  .footer-grid,
  .detail-wrap {
    grid-template-columns: 1fr;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }
}

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

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-one-line {
    font-size: 17px;
  }

  .section {
    padding: 36px 0;
  }

  .section-head,
  .page-head {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .card-title {
    font-size: 14px;
  }

  .rank-item {
    grid-template-columns: 34px 54px 1fr;
  }

  .article-card {
    padding: 20px;
  }

  .player-meta {
    display: block;
  }
}
