* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #0ea5e9 52%, #f97316);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.28);
  font-size: 14px;
}

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

.desktop-nav a {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #0284c7;
}

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

.nav-search input,
.search-box input {
  width: 210px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 9px 12px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.search-box input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.nav-search button,
.primary-button,
.section-more,
.category-panel-head a {
  border: 0;
  border-radius: 12px;
  padding: 9px 15px;
  color: #ffffff;
  background: #0284c7;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.primary-button:hover,
.section-more:hover,
.category-panel-head a:hover {
  background: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.26);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 24px;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid #e2e8f0;
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
  animation: slideDown 0.25s ease-out;
}

.mobile-panel a {
  color: #334155;
  font-weight: 700;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  min-width: 0;
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
}

.mobile-panel button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  background: #0284c7;
  font-weight: 700;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.55) 46%, rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 8px;
  color: #0ea5e9;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 860px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p:not(.eyebrow) {
  max-width: 740px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-tags,
.detail-meta,
.tag-list,
.card-meta,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  padding: 9px 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 750;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.54);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.78);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: #ffffff;
}

.main-stack,
.page-shell,
.detail-shell {
  padding: 48px 0 0;
}

.content-section {
  margin-bottom: 56px;
}

.section-heading,
.category-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2,
.category-panel h2,
.detail-block h2,
.footer-grid h2 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-heading p,
.category-panel p,
.page-title p,
.detail-block p,
.footer-grid p {
  margin: 8px 0 0;
  color: #64748b;
}

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

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

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

.movie-card {
  min-width: 0;
}

.poster-card a,
.feature-card .feature-link,
.horizontal-card a,
.rank-hero-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-card a:hover,
.feature-card .feature-link:hover,
.horizontal-card a:hover,
.rank-hero-card a:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 38px -12px rgba(15, 23, 42, 0.22);
}

.poster-wrap,
.feature-link {
  position: relative;
}

.poster-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-wrap img,
.feature-card img,
.horizontal-card img,
.rank-hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poster-card a:hover img,
.feature-card a:hover img,
.horizontal-card a:hover img,
.rank-hero-card a:hover img {
  transform: scale(1.08);
}

.card-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.card-type {
  right: 10px;
  top: 10px;
  padding: 7px 10px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.32);
}

.rank-badge.big {
  position: static;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  font-size: 18px;
}

.poster-body {
  padding: 14px;
}

.poster-body h3,
.feature-text h3,
.horizontal-body h3,
.rank-hero-card h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-weight: 850;
  line-height: 1.35;
}

.poster-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  font-size: 16px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.poster-body p,
.feature-text p,
.horizontal-body p,
.rank-hero-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #64748b;
  font-size: 12px;
}

.card-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: #94a3b8;
}

.feature-card .feature-link {
  position: relative;
  min-height: 320px;
  background: #020617;
}

.feature-card img {
  position: absolute;
  inset: 0;
}

.feature-card .feature-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.16));
}

.feature-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px;
}

.feature-text h3 {
  color: #ffffff;
  font-size: 24px;
}

.feature-text p,
.feature-text .card-meta {
  color: rgba(255, 255, 255, 0.84);
}

.horizontal-card a {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.horizontal-card img {
  aspect-ratio: 4 / 3;
}

.horizontal-body {
  padding: 16px 18px 16px 0;
}

.horizontal-body h3 {
  font-size: 18px;
}

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

.category-preview,
.category-panel,
.toolbar-section,
.detail-block {
  border-radius: 24px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.category-overview {
  display: grid;
  gap: 24px;
}

.page-title {
  margin-bottom: 30px;
  border-radius: 28px;
  padding: 34px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.7), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b 55%, #075985);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.page-title h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-title p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
}

.toolbar-section {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.search-box {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}

.search-box.wide input,
.search-box input {
  width: 100%;
}

.year-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #334155;
  background: #e2e8f0;
  font-weight: 750;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.year-chip:hover,
.year-chip.active {
  color: #ffffff;
  background: #f97316;
  transform: translateY(-1px);
}

.rank-hero-card {
  margin-bottom: 30px;
}

.rank-hero-card a {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 28px;
  padding: 22px;
}

.rank-hero-card img {
  border-radius: 18px;
  aspect-ratio: 16 / 9;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0284c7;
  font-weight: 750;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

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

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  box-shadow: 0 18px 45px rgba(2, 132, 199, 0.42);
  font-size: 34px;
  transform: translate(-50%, -50%);
}

.detail-info {
  border-radius: 24px;
  padding: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e293b 58%, #0369a1);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.lead-text {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.detail-meta span,
.tag-list span {
  background: rgba(255, 255, 255, 0.14);
}

.tag-list {
  margin-top: 18px;
}

.detail-block p {
  color: #334155;
  font-size: 17px;
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-grid h2 {
  color: #ffffff;
  font-size: 17px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #94a3b8;
}

.footer-grid ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a:hover {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 16px;
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 12px;
  }

  .desktop-nav a:nth-of-type(n + 7) {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero {
    height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

  .detail-hero,
  .rank-hero-card a,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-hero-card img {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .container,
  .nav-shell,
  .mobile-panel,
  .footer-grid {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    height: 500px;
  }

  .hero-content {
    bottom: 62px;
    width: min(100% - 24px, 1280px);
  }

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

  .hero-content p:not(.eyebrow) {
    font-size: 16px;
  }

  .section-heading,
  .category-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-grid,
  .card-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-preview,
  .category-panel,
  .toolbar-section,
  .detail-block,
  .page-title,
  .detail-info {
    border-radius: 18px;
    padding: 20px;
  }

  .poster-body p {
    display: none;
  }

  .horizontal-card a {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 12px;
  }

  .horizontal-body {
    padding: 12px 12px 12px 0;
  }

  .horizontal-body p {
    -webkit-line-clamp: 1;
  }

  .player-shell {
    border-radius: 18px;
  }
}

@media (max-width: 430px) {
  .card-grid,
  .compact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .poster-body h3 {
    min-height: auto;
    font-size: 15px;
  }

  .card-meta {
    font-size: 11px;
  }

  .hero-tags span,
  .detail-meta span,
  .tag-list span {
    padding: 5px 10px;
    font-size: 12px;
  }
}
