* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8f9fa;
  color: #0d0f12;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.is-menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #0073e6, #ff8a00);
  color: #ffffff;
  font-size: 0.82rem;
  box-shadow: 0 8px 22px rgba(0, 115, 230, 0.32);
}

.logo-text {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  background: linear-gradient(90deg, #0073e6, #ff8a00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-link,
.mobile-nav-link {
  color: #343a40;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #0073e6;
}

.mobile-menu-button {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
}

.mobile-menu-button span {
  width: 1.2rem;
  height: 2px;
  border-radius: 999px;
  background: #1f2937;
}

.mobile-nav {
  display: none;
  padding: 0.8rem 1rem 1rem;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.5rem;
}

.mobile-nav-link {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
}

.mobile-nav-link.is-active {
  background: #e6f2ff;
}

.hero-carousel {
  position: relative;
  height: clamp(520px, 70vh, 760px);
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.hero-kicker span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 1.7rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 1.35rem;
  border-radius: 0.7rem;
  font-weight: 700;
}

.btn-primary {
  background: #0073e6;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 115, 230, 0.28);
}

.btn-primary:hover {
  background: #005bb3;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 1.8rem;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

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

.hero-dots button.is-active {
  width: 2rem;
  background: #ffffff;
}

.home-search-section {
  position: relative;
  z-index: 5;
  margin-top: -2rem;
}

.home-search,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.85rem 1rem;
  color: #111827;
  outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #0073e6;
  box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.12);
}

.filter-panel {
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 0.24fr));
  margin-bottom: 2rem;
}

.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-white {
  background: #ffffff;
}

.gradient-section {
  background: linear-gradient(135deg, #e6f2ff, #fff3e6);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading span {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: #0073e6;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  color: #0d0f12;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.section-heading a,
.text-link {
  color: #0073e6;
  font-weight: 700;
}

.feature-grid,
.movie-grid,
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.3rem;
}

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

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

.movie-card,
.overview-card,
.info-card,
.detail-article {
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.15);
}

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

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

.poster-wrap img,
.overview-media img,
.category-card img,
.list-cover img,
.detail-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .poster-wrap img,
.overview-card:hover .overview-media img,
.category-card:hover img {
  transform: scale(1.05);
}

.poster-shade,
.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.68));
}

.year-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 0.7rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.year-badge {
  left: 0.7rem;
  background: rgba(0, 115, 230, 0.9);
}

.type-badge {
  right: 0.7rem;
  background: rgba(255, 138, 0, 0.92);
}

.rank-badge {
  left: 0.7rem;
  top: auto;
  bottom: 0.7rem;
  background: rgba(0, 0, 0, 0.66);
}

.movie-card-body {
  padding: 1rem;
}

.movie-title {
  display: -webkit-box;
  margin-bottom: 0.5rem;
  overflow: hidden;
  color: #0d0f12;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover,
.list-title:hover,
.overview-card h2 a:hover {
  color: #0073e6;
}

.movie-desc {
  display: -webkit-box;
  min-height: 2.9em;
  margin: 0 0 0.75rem;
  overflow: hidden;
  color: #64748b;
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta,
.list-meta,
.side-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.83rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tag-row span,
.tag-row a,
.year-links a {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-row a:hover,
.year-links a:hover {
  background: #0073e6;
  color: #ffffff;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  display: flex;
  overflow: hidden;
  border-radius: 1rem;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.13);
}

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

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
  align-self: end;
}

.category-card strong {
  width: 100%;
  margin: auto 1rem 3.1rem;
  font-size: 1.2rem;
  font-style: normal;
}

.category-card em {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
  font-style: normal;
}

.year-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.page-main {
  padding-top: 76px;
}

.page-hero {
  padding: clamp(4rem, 9vw, 7rem) 0;
  background: linear-gradient(135deg, #00131a, #003b70 52%, #ff8a00);
  color: #ffffff;
}

.page-hero span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 0.6rem 0 0.8rem;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.overview-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.overview-body {
  padding: 1.5rem;
}

.overview-body h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
}

.overview-body p {
  margin: 0 0 1rem;
  color: #64748b;
}

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

.filter-card.is-hidden,
.empty-state {
  display: none;
}

.empty-state.is-visible {
  display: block;
  padding: 3rem 0;
  text-align: center;
  color: #64748b;
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.list-card {
  display: grid;
  grid-template-columns: auto 96px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.list-rank {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0073e6, #ff8a00);
  color: #ffffff;
  font-weight: 900;
}

.list-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #111827;
}

.list-title {
  color: #0d0f12;
  font-size: 1.15rem;
  font-weight: 800;
}

.list-main p {
  margin: 0.45rem 0 0.65rem;
  color: #64748b;
}

.detail-main {
  padding-top: 76px;
}

.detail-top {
  padding: 2rem 0 3rem;
  background: #111827;
}

.detail-breadcrumb {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.72);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #030712;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  aspect-ratio: 16 / 9;
}

.video-el {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #030712;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.75rem;
  padding: 2rem;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.82), rgba(3, 7, 18, 0.35));
  color: #ffffff;
  text-align: center;
}

.play-cover.is-hidden {
  display: none;
}

.play-circle {
  width: 5rem;
  height: 5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #0073e6;
  box-shadow: 0 15px 34px rgba(0, 115, 230, 0.38);
  font-size: 1.8rem;
}

.play-cover strong {
  max-width: min(100%, 680px);
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.play-cover em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.player-controls {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-card:hover .player-controls,
.player-controls.is-visible {
  opacity: 1;
}

.player-controls button {
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 0.55rem 0.85rem;
}

.player-controls button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.player-card.has-error::after {
  content: "播放出错，请稍后重试";
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: rgba(3, 7, 18, 0.9);
  color: #ffffff;
  font-weight: 700;
}

.detail-side {
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
}

.detail-side img {
  aspect-ratio: 3 / 4;
}

.side-meta {
  padding: 1rem;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

.detail-article,
.info-card {
  padding: clamp(1.3rem, 3vw, 2rem);
}

.detail-article h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
}

.detail-article h2,
.info-card h2 {
  margin: 1.7rem 0 0.8rem;
  color: #0d0f12;
  font-size: 1.35rem;
}

.detail-article p {
  margin: 0 0 1rem;
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.8;
}

.lead-text {
  color: #334155 !important;
  font-size: 1.1rem !important;
  font-weight: 600;
}

.info-card dl,
.info-card dt,
.info-card dd {
  margin: 0;
}

.info-card dl {
  display: grid;
  gap: 0.85rem;
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.85rem;
}

.info-card dt {
  color: #64748b;
}

.info-card dd {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
}

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

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

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

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

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

  .mobile-menu-button {
    display: flex;
  }

  .feature-grid,
  .overview-grid,
  .detail-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .overview-card {
    grid-template-columns: 1fr;
  }

  .detail-side {
    display: none;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 1.2rem, 1280px);
  }

  .header-inner {
    height: 64px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-control {
    display: none;
  }

  .home-search,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .movie-grid,
  .category-movie-grid,
  .compact-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .movie-card-body {
    padding: 0.8rem;
  }

  .movie-desc {
    min-height: auto;
  }

  .list-card {
    grid-template-columns: auto 76px 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .list-rank {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }

  .list-title {
    font-size: 1rem;
  }

  .list-main p {
    display: none;
  }

  .detail-main,
  .page-main {
    padding-top: 64px;
  }

  .detail-top {
    padding-top: 1rem;
  }

  .player-card {
    border-radius: 0.7rem;
  }

  .play-circle {
    width: 4rem;
    height: 4rem;
  }
}
