* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
  font-size: 15px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link,
.nav-icon,
.mobile-link {
  border-radius: 12px;
  color: #475569;
  font-weight: 650;
  transition: all 0.22s ease;
}

.nav-link {
  padding: 10px 16px;
  font-size: 15px;
}

.nav-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  font-size: 26px;
}

.nav-link:hover,
.nav-icon:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #0369a1;
  background: #e0f2fe;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  padding: 10px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #0f172a;
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-menu.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  display: block;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.08) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #0284c7;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.26);
}

.hero h1,
.page-hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
}

.hero .tag {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

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

.primary-button,
.home-search-box button {
  color: #ffffff;
  background: #0284c7;
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.28);
}

.primary-button:hover,
.home-search-box button:hover {
  transform: translateY(-2px);
  background: #0369a1;
  box-shadow: 0 22px 38px rgba(2, 132, 199, 0.34);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

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

.primary-button.full {
  width: 100%;
  margin-top: 16px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(12px);
  font-size: 32px;
  cursor: pointer;
}

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

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

.home-search {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: -40px auto 0;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(16px);
}

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

.home-search-box input,
.search-field input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
}

.home-search-box input {
  padding: 0 20px;
}

.home-search-box input:focus,
.search-field input:focus,
.filter-panel select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.quick-categories,
.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-pill,
.category-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-weight: 750;
  font-size: 14px;
}

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

.page-top {
  padding-top: 34px;
}

.content-section {
  margin: 58px 0;
}

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

.section-heading h2,
.feature-panel h2,
.detail-info h2,
.side-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-heading p,
.feature-panel p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.7;
}

.compact-heading {
  margin-bottom: 18px;
}

.section-more {
  flex: none;
  color: #0284c7;
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card[hidden] {
  display: none;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #082f49;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #0284c7;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: #f97316;
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  opacity: 0;
  border-radius: 999px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.86);
  transition: all 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.4;
}

.card-body h3 a:hover {
  color: #0284c7;
}

.card-body p {
  min-height: 44px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 24px;
  margin: 58px 0;
}

.feature-panel,
.side-panel,
.detail-info,
.poster-card,
.filter-panel,
.page-hero,
.category-card {
  border: 1px solid #e0f2fe;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.feature-panel {
  padding: 24px;
}

.glow-panel {
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.25), transparent 35%), #ffffff;
}

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

.rank-list.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-row {
  display: grid;
  grid-template-columns: auto 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.22s ease, transform 0.22s ease;
}

.rank-row:hover {
  transform: translateX(3px);
  background: #e0f2fe;
}

.list-rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #0284c7;
  font-weight: 850;
  font-size: 13px;
}

.rank-row img {
  width: 58px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title {
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 44px;
  color: #ffffff;
  background: linear-gradient(135deg, #082f49, #0284c7 55%, #38bdf8);
}

.compact-hero p {
  width: min(760px, 100%);
}

.category-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  margin: 42px 0 70px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 22px;
  color: #ffffff;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.15));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  margin-top: 105px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.category-card:hover img {
  transform: scale(1.08);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 160px 160px;
  gap: 12px;
  padding: 16px;
  margin: 26px 0 32px;
}

.search-field {
  position: relative;
  display: block;
}

.search-field span {
  position: absolute;
  left: 16px;
  top: 50%;
  color: #0284c7;
  font-size: 24px;
  transform: translateY(-50%);
}

.search-field input {
  padding: 0 18px 0 46px;
}

.filter-panel select {
  padding: 0 14px;
}

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

.empty-state.show {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

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

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

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.2);
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #0284c7;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.1));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.26);
  font-size: 32px;
}

.player-overlay.is-hidden {
  display: none;
}

.detail-info {
  margin-top: 24px;
  padding: 28px;
}

.detail-info h1 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

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

.detail-meta span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-weight: 700;
  font-size: 14px;
}

.detail-info h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 26px;
}

.detail-info p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.poster-card,
.side-panel {
  padding: 18px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.side-panel {
  margin-top: 20px;
}

.side-panel h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.side-links {
  display: grid;
  gap: 8px;
}

.side-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  font-weight: 750;
}

.side-links a:hover {
  color: #0369a1;
  background: #e0f2fe;
}

.side-links span {
  flex: none;
  color: #64748b;
  font-size: 13px;
}

.movie-card.compact .card-body p {
  display: none;
}

.movie-card.compact .card-meta {
  margin-top: 10px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 560px;
  margin: 10px 0 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-content: start;
}

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

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
  }

  .side-panel {
    margin-top: 0;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
  }

  .brand {
    font-size: 19px;
  }

  .nav-menu {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 92px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-box {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .footer-inner {
    display: block;
  }

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

  .movie-grid,
  .archive-grid,
  .related-grid,
  .category-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .rank-list.two-column,
  .filter-panel,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: auto 52px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .page-hero,
  .detail-info {
    padding: 24px;
  }

  .poster-card {
    display: none;
  }

  .footer-links {
    margin-top: 20px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .archive-grid,
  .related-grid,
  .category-overview {
    grid-template-columns: 1fr;
  }

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

  .home-search {
    margin-top: -28px;
  }
}
