
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 60%, #f1f5f9 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.26);
}

.nav-wrap {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.36);
}

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

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 64px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.22s ease;
}

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

.nav-link.active::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: #60a5fa;
}

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

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

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

.mobile-link {
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.88);
}

.nav-cats {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.6);
}

.nav-cats-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.nav-cats a {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.22s ease, color 0.22s ease;
}

.nav-cats a:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.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);
  filter: saturate(1.08) contrast(1.05);
}

.hero-slide.active img {
  animation: heroZoom 7.2s ease both;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 35%, rgba(15, 23, 42, 0.16) 78%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.42) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 78px;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.26);
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 750;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.btn-soft {
  color: #1d4ed8;
  background: #dbeafe;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-1px);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 16px;
}

.section-tight {
  padding-top: 36px;
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 800;
  color: #2563eb;
}

.section h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.section-intro {
  max-width: 760px;
  margin: 12px 0 0;
  color: #64748b;
  line-height: 1.75;
}

.link-more {
  flex: 0 0 auto;
  color: #2563eb;
  font-weight: 800;
}

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

.feature-card {
  position: relative;
  min-height: 275px;
  overflow: hidden;
  border-radius: 18px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.feature-card img {
  height: 100%;
  min-height: 275px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.feature-card:hover img {
  transform: scale(1.1);
}

.feature-shade {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.52) 48%, transparent 100%);
}

.feature-card h3,
.movie-card h3,
.wide-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.feature-card h3 {
  font-size: 24px;
}

.feature-card p,
.movie-card p,
.wide-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.feature-card p {
  color: #cbd5e1;
}

.scroll-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 2px 0 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  width: 320px;
  flex: 0 0 320px;
  scroll-snap-align: start;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

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

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

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

.card-body,
.wide-body {
  padding: 18px;
}

.card-body h3 {
  color: #1f2937;
  transition: color 0.22s ease;
}

.movie-card:hover h3,
.wide-card:hover h3 {
  color: #2563eb;
}

.card-meta,
.rating-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.card-meta {
  margin-bottom: 10px;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.card-meta.light,
.rating-line.light {
  color: #e5e7eb;
}

.card-meta.light span {
  background: rgba(255, 255, 255, 0.16);
}

.rating-line {
  margin-top: 14px;
  justify-content: space-between;
}

.rating-line span:first-child,
.rank-score {
  color: #eab308;
  font-weight: 850;
}

.wide-card {
  display: flex;
  gap: 0;
}

.wide-cover {
  width: 180px;
  flex: 0 0 180px;
  overflow: hidden;
  background: #0f172a;
}

.wide-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wide-body h3 {
  color: #1f2937;
}

.band {
  border-radius: 28px;
  background: linear-gradient(135deg, #f1f5f9 0%, #dbeafe 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.band-inner {
  padding: 34px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 84px minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.rank-no {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.rank-item img {
  width: 84px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text strong {
  color: #111827;
}

.rank-text em {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.stats-panel {
  margin-top: 64px;
  padding: 42px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.22);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  text-align: center;
}

.stat strong {
  display: block;
  margin-bottom: 8px;
  font-size: 44px;
  color: #60a5fa;
}

.stat span {
  color: #cbd5e1;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
}

.page-hero .section {
  padding-top: 54px;
  padding-bottom: 54px;
}

.page-hero h1 {
  color: #ffffff;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #cbd5e1;
  line-height: 1.75;
}

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

.category-card {
  position: relative;
  min-height: 200px;
  padding: 26px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #0f172a 100%);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -44px;
  bottom: -54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-card span {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-btn,
.search-select {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.filter-btn.active {
  color: #ffffff;
  background: #2563eb;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
}

.search-input {
  width: 100%;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  outline: none;
}

.search-input:focus {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 10px 26px rgba(15, 23, 42, 0.12);
}

.result-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  color: #64748b;
}

.result-bar strong {
  color: #0f172a;
}

.empty-state {
  display: none;
  padding: 64px 20px;
  border-radius: 24px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: #64748b;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
  gap: 32px;
  align-items: start;
}

.panel {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
}

.info-panel {
  padding: 28px;
}

.info-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
}

.detail-meta span:first-child {
  color: #1d4ed8;
  background: #dbeafe;
}

.info-block {
  margin-top: 26px;
}

.info-block h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #111827;
}

.info-block p {
  margin: 0;
  color: #374151;
  font-size: 17px;
  line-height: 1.85;
}

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

.player-card {
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.22);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.44);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 34px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
  transform: translateX(4px);
}

.side-panel {
  position: sticky;
  top: 106px;
  padding: 22px;
}

.side-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 112px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.side-link strong,
.side-link span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-link strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #111827;
  line-height: 1.45;
}

.side-link span {
  margin-top: 6px;
  color: #64748b;
  white-space: nowrap;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 16px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 32px;
}

.footer-main p {
  max-width: 560px;
  margin: 16px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-brand {
  color: #ffffff;
}

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

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  text-align: center;
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

  .hero-content {
    padding-bottom: 72px;
  }

  .feature-grid,
  .movie-grid,
  .rank-grid,
  .stats-grid,
  .footer-wrap,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .wide-cover {
    width: 132px;
    flex-basis: 132px;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

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

  .section {
    padding-top: 42px;
    padding-bottom: 42px;
  }

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

  .rank-item {
    grid-template-columns: 34px 74px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .side-link {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .side-link img {
    width: 96px;
    height: 64px;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
