* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f4f6;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --red: #dc2626;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background: var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(16px);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle {
  display: none;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  font-size: 24px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.8), transparent 32%), linear-gradient(135deg, #111827, #020617);
}

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

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

.hero-image,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: relative;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 84px 0 78px;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 16px 0;
  max-width: 820px;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-intro p {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.red-pill {
  color: #ffffff;
  background: var(--red);
}

.blue-pill {
  color: #ffffff;
  background: var(--blue);
}

.hero-tags,
.detail-tags,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-line span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
}

.card-body .tag-line span,
.detail-content .tag-line span {
  background: #eff6ff;
  color: #1d4ed8;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.35);
}

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

.primary-btn:hover {
  background: var(--blue-dark);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-dots {
  position: absolute;
  right: clamp(20px, 6vw, 80px);
  bottom: 42px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.hot-strip {
  padding: 42px 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

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

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.hot-strip .eyebrow,
.light-head .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

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

.strip-controls {
  display: flex;
  gap: 10px;
}

.strip-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  font-size: 24px;
}

.horizontal-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.horizontal-row::-webkit-scrollbar {
  display: none;
}

.horizontal-row .movie-card {
  flex: 0 0 280px;
}

.section-block {
  padding: 56px 0;
  background: #ffffff;
}

.gray-block {
  background: #f3f4f6;
}

.deep-block {
  background: linear-gradient(135deg, #1e3a8a, #0891b2);
  color: #ffffff;
}

.section-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.movie-grid,
.compact-grid,
.category-panels {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-link,
.poster-wrap {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

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

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

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

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  padding: 17px;
}

.card-meta,
.meta-row,
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-meta a,
.meta-row a,
.breadcrumbs a {
  color: var(--blue);
}

.movie-card h3,
.rank-item h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-card p,
.rank-item p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card .card-body {
  padding: 14px;
}

.compact-card h3 {
  font-size: 16px;
}

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

.category-cloud a,
.category-panel {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.category-cloud a {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-weight: 900;
}

.category-cloud a:hover,
.category-panel:hover {
  transform: translateY(-3px);
}

.page-hero {
  padding: 82px 0 76px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.75), transparent 30%), linear-gradient(135deg, #111827, #1e3a8a 55%, #0891b2);
}

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

.category-panel {
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-title {
  display: inline-block;
  margin-bottom: 12px;
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}

.category-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar-wrap {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 0;
}

.filter-bar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.filter-bar select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.sortable-grid.list-mode {
  display: grid;
  grid-template-columns: 1fr;
}

.sortable-grid.list-mode .sort-cell .movie-card {
  display: grid;
  grid-template-columns: 180px 1fr;
}

.sortable-grid.list-mode .poster-wrap {
  aspect-ratio: 4 / 3;
  height: 100%;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 98px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.rank-num {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
}

.rank-cover {
  width: 98px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8, #111827);
}

.rank-score {
  text-align: center;
  color: var(--muted);
  min-width: 86px;
}

.rank-score strong {
  display: block;
  color: var(--blue);
  font-size: 24px;
}

.rank-score span {
  font-size: 12px;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #020617, #1e3a8a);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.38));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
  min-height: 520px;
  padding: 76px 0 56px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background: linear-gradient(135deg, #1d4ed8, #020617);
  box-shadow: var(--shadow);
}

.breadcrumbs {
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.7);
}

.detail-tags {
  margin-top: 20px;
}

.player-section {
  padding: 34px 0;
  background: #020617;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent 60%);
  cursor: pointer;
}

.play-cover span {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 36px;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.38);
}

.player-shell.playing .play-cover {
  display: none;
}

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

.detail-content,
.side-panel {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-content {
  padding: 30px;
}

.detail-content h2,
.side-panel h2 {
  margin: 24px 0 12px;
  font-size: 24px;
}

.detail-content h2:first-of-type,
.side-panel h2:first-child {
  margin-top: 0;
}

.detail-content p {
  margin: 0 0 20px;
  color: #374151;
  font-size: 17px;
  line-height: 1.85;
}

.side-panel {
  align-self: start;
  padding: 22px;
}

.side-panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: #1d4ed8;
  font-weight: 800;
}

.hero-search {
  display: flex;
  max-width: 720px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 22px;
  outline: none;
}

.hero-search button {
  min-height: 54px;
  padding: 0 26px;
  border: 0;
  color: #ffffff;
  background: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.site-footer {
  padding: 42px 0 24px;
  color: rgba(255, 255, 255, 0.72);
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: start;
}

.footer-logo {
  color: #ffffff;
}

.site-footer p {
  max-width: 560px;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.copyright {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.98);
  }

  .main-nav.open {
    display: flex;
  }

  .hero-carousel,
  .hero-content {
    min-height: 520px;
  }

  .strip-inner,
  .section-head,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 44px 76px 1fr;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

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

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

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

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

  .horizontal-row .movie-card {
    flex-basis: 250px;
  }

  .sortable-grid.list-mode .sort-cell .movie-card {
    grid-template-columns: 1fr;
  }

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

  .rank-cover {
    display: none;
  }

  .rank-score {
    grid-column: 2;
  }

  .hero-search {
    border-radius: 18px;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 52px;
  }
}
