* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #fafaf9;
  color: #292524;
  line-height: 1.5;
}

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

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

button,
input,
select {
  font: inherit;
}

.container-custom {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-shell {
  height: 4rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #1c1917;
  white-space: nowrap;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.75rem;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.28);
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 4rem;
  color: #57534e;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #0284c7;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: 3.7rem;
  min-width: 10rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  display: none;
}

.nav-dropdown:hover .dropdown-panel {
  display: grid;
  gap: 0.25rem;
}

.dropdown-panel a {
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  color: #57534e;
  font-size: 0.92rem;
}

.dropdown-panel a:hover {
  background: #f0f9ff;
  color: #0284c7;
}

.nav-search {
  display: none;
  width: min(22rem, 35vw);
  position: relative;
}

.input-field {
  width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 0.5rem;
  padding: 0.68rem 1rem;
  background: #ffffff;
  color: #292524;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px #0ea5e9;
}

.icon-button,
.mobile-toggle {
  border: 0;
  background: transparent;
  color: #57534e;
  cursor: pointer;
}

.icon-button {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  color: #0284c7;
  font-size: 1.35rem;
}

.mobile-toggle {
  margin-left: auto;
  font-size: 1.4rem;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #e7e5e4;
  background: #ffffff;
  padding: 0.75rem 1rem 1rem;
}

.mobile-panel.is-open {
  display: grid;
  gap: 0.25rem;
}

.mobile-panel a {
  padding: 0.7rem 0.5rem;
  border-radius: 0.5rem;
  color: #57534e;
  font-weight: 600;
}

.mobile-panel a:hover {
  background: #f0f9ff;
  color: #0284c7;
}

.btn-primary,
.btn-ghost {
  border: 0;
  border-radius: 0.5rem;
  padding: 0.82rem 1.35rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.24);
}

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

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

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

.card {
  overflow: hidden;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.hero {
  position: relative;
  min-height: 660px;
  background: #0c4a6e;
  color: #ffffff;
}

.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

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

.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(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.2)), linear-gradient(0deg, rgba(12, 74, 110, 0.8), rgba(12, 74, 110, 0.05));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 46rem;
  padding-top: 2rem;
}

.eyebrow {
  color: #38bdf8;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-copy h1,
.page-hero-card h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
}

.hero-copy p {
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-tags {
  margin: 1.35rem 0;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

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

.hero-bottom {
  position: relative;
  z-index: 2;
  min-height: 660px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  padding-bottom: 2rem;
  gap: 1rem;
}

.hero-search {
  display: flex;
  gap: 0.75rem;
  width: min(100%, 48rem);
  padding: 0.75rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-search .input-field {
  border-color: transparent;
}

.hero-search.compact {
  align-self: end;
  max-width: 34rem;
}

.hero-panel {
  display: none;
  position: absolute;
  right: 1rem;
  bottom: 2rem;
  width: 22rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.hero-panel-title {
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.hero-panel-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.2rem 0.6rem;
  padding: 0.7rem;
  border-radius: 0.7rem;
}

.hero-panel-item:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-panel-item span {
  grid-row: span 2;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #0284c7;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.hero-panel-item strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-panel-item small {
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-dots {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
}

.hero-dot {
  width: 2rem;
  height: 0.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.section-block {
  margin-top: 3.5rem;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #1c1917;
  font-weight: 900;
}

.section-heading p {
  margin: 0.35rem 0 0;
  color: #78716c;
}

.section-link {
  color: #0284c7;
  font-weight: 800;
  white-space: nowrap;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 1rem;
}

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

.category-card,
.category-overview-link {
  display: grid;
  gap: 0.4rem;
  border-radius: 0.85rem;
  padding: 1.25rem;
  color: #ffffff;
  min-height: 10rem;
}

.category-card span,
.category-overview-link span {
  font-size: 1.18rem;
  font-weight: 900;
}

.category-card strong,
.category-overview-link strong {
  font-size: 2rem;
  line-height: 1;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.tone-blue {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.tone-amber {
  background: linear-gradient(135deg, #b45309, #92400e);
}

.tone-green {
  background: linear-gradient(135deg, #059669, #047857);
}

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

.movie-card {
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-3px);
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e7e5e4;
}

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

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

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

.rank-badge {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.95);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.movie-card-body {
  padding: 0.9rem;
  display: grid;
  gap: 0.55rem;
  flex: 1;
}

.movie-card h3 {
  margin: 0;
  color: #1c1917;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.35;
}

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

.movie-card p {
  margin: 0;
  color: #78716c;
  font-size: 0.88rem;
  line-height: 1.65;
}

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #78716c;
  font-size: 0.78rem;
}

.movie-meta-line span,
.detail-meta span {
  border-radius: 999px;
  background: #f5f5f4;
  padding: 0.16rem 0.5rem;
}

.tag-row span {
  background: #f0f9ff;
  color: #0369a1;
}

.tag-row.large span {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
}

.page-main {
  padding-top: 1.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #78716c;
  font-size: 0.92rem;
  margin: 0.5rem 0 1rem;
}

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

.breadcrumb span::before {
  content: "/";
  margin-right: 0.45rem;
  color: #a8a29e;
}

.page-hero-card {
  display: grid;
  gap: 1rem;
  align-items: center;
  border-radius: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff, #ecfdf5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-hero-card p {
  max-width: 48rem;
  color: #57534e;
  font-size: 1rem;
  line-height: 1.8;
}

.page-hero-card > strong {
  font-size: 2.2rem;
  color: #0284c7;
}

.filter-panel {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-overview-card {
  padding-bottom: 1rem;
}

.category-overview-card p {
  margin: 1rem 1rem 0.75rem;
  color: #57534e;
  line-height: 1.7;
}

.category-overview-card ul {
  margin: 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.category-overview-card li a {
  color: #0284c7;
  font-weight: 700;
}

.detail-hero {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}

.detail-cover {
  max-width: 21rem;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  color: #1c1917;
}

.detail-one-line {
  color: #57534e;
  font-size: 1.1rem;
  line-height: 1.8;
  margin: 1rem 0;
}

.detail-meta {
  margin-bottom: 1rem;
}

.detail-info .btn-primary {
  margin-top: 1.2rem;
}

.player-card {
  margin-top: 2rem;
  background: #111827;
}

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

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

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 0.7rem;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.2));
  cursor: pointer;
}

.video-shell.is-playing .play-mask {
  display: none;
}

.play-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0284c7;
  box-shadow: 0 14px 36px rgba(2, 132, 199, 0.38);
  font-size: 1.6rem;
}

.play-mask strong {
  font-size: 1.15rem;
}

.detail-layout {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.detail-article,
.detail-side {
  padding: 1.25rem;
}

.detail-article h2,
.detail-side h2,
.site-footer h2 {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 900;
  color: #1c1917;
}

.detail-article p {
  margin: 0 0 1.1rem;
  color: #57534e;
  line-height: 1.9;
}

.detail-side dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.detail-side dt {
  color: #78716c;
  font-size: 0.86rem;
}

.detail-side dd {
  margin: 0 0 0.45rem;
  color: #292524;
  font-weight: 700;
}

.search-panel {
  margin-top: 1rem;
}

.search-large {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-result-title {
  margin: 1.25rem 0;
  font-size: 1.4rem;
  font-weight: 900;
}

.site-footer {
  margin-top: 4rem;
  background: #1c1917;
  color: #d6d3d1;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 1rem;
}

.site-footer p {
  color: #a8a29e;
  line-height: 1.8;
  margin: 0;
}

.site-footer h2 {
  color: #ffffff;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

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

.footer-bottom {
  border-top: 1px solid #292524;
  text-align: center;
  padding: 1rem;
  color: #a8a29e;
  font-size: 0.9rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

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

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

  .page-hero-card {
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 768px) {
  .desktop-nav,
  .nav-search {
    display: flex;
  }

  .mobile-toggle {
    display: none;
  }

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

  .detail-hero {
    grid-template-columns: 20rem 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }

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

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

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

  .hero-panel {
    display: block;
  }

  .hero-search {
    margin-right: 23rem;
  }
}

@media (max-width: 639px) {
  .hero {
    min-height: 720px;
  }

  .hero-bottom {
    min-height: 720px;
  }

  .hero-search,
  .search-large {
    flex-direction: column;
  }

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

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