* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #111827;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #f3f4f6 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #4b5563);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
  font-weight: 700;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.brand-text em {
  margin-top: 2px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.top-search,
.mobile-search,
.search-panel {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: rgba(249, 250, 251, 0.82);
  overflow: hidden;
}

.top-search {
  flex: 1;
  max-width: 420px;
}

.top-search input,
.mobile-search input,
.search-panel input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 14px 11px 18px;
}

.top-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  color: #ffffff;
  background: #111827;
  padding: 10px 18px;
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #4b5563;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #111827;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid #e5e7eb;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-link {
  padding: 11px 14px;
  border-radius: 12px;
  color: #4b5563;
  background: #f9fafb;
}

.mobile-link.is-active {
  color: #111827;
  background: #e5e7eb;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-stage {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  transition: opacity 0.55s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(31, 41, 55, 0.72), rgba(17, 24, 39, 0.36));
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  min-height: 560px;
  gap: 56px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 14px;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -1px;
}

.hero-copy h2 {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
}

.hero-copy p {
  margin: 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.ranking-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.ranking-info div span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  padding: 5px 11px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.ghost-dark-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  padding: 13px 24px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.primary-btn:hover,
.ghost-btn:hover,
.ghost-dark-btn:hover,
.small-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  padding: 12px 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.ghost-dark-btn {
  padding: 12px 22px;
  color: #111827;
  border: 1px solid #d1d5db;
  background: #ffffff;
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 112px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

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

.hero-thumbs {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: -82px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 10px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(12px);
}

.hero-thumb img {
  width: 56px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
}

.page-section {
  padding: 68px 0 0;
}

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

.section-head h2 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
}

.section-head p {
  margin: 8px 0 0;
  color: #6b7280;
}

.section-more {
  color: #4b5563;
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid #f3f4f6;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: #d1d5db;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e5e7eb;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #1f2937;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta span,
.ranking-info div span {
  color: #6b7280;
  background: #f3f4f6;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.card-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #4b5563;
  background: #f9fafb;
  font-size: 12px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.category-cover {
  position: relative;
  min-height: 180px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.16), rgba(17, 24, 39, 0.68)), var(--category-image) center / cover;
}

.category-cover span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.category-body {
  padding: 22px;
}

.category-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-body p {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-links a {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  padding: 6px 10px;
  color: #374151;
  background: #f3f4f6;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 92px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 70px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #f3f4f6;
}

.rank-item:first-of-type {
  border-top: 0;
}

.rank-no {
  color: #111827;
  font-weight: 800;
}

.rank-item img {
  width: 70px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
}

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

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

.rank-info strong {
  color: #1f2937;
  font-size: 14px;
}

.rank-info em {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 12px;
  font-style: normal;
}

.page-main {
  min-height: 68vh;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #374151);
}

.slim-hero,
.category-hero {
  background: radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.16), transparent 28%), linear-gradient(135deg, #111827, #4b5563);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 7px 13px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
  height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #ffffff;
  padding: 0 14px;
  outline: 0;
}

.filter-bar input {
  flex: 1;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 70px 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 14px;
  background: #ffffff;
}

.ranking-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  background: #111827;
  font-weight: 800;
}

.ranking-cover img {
  width: 150px;
  height: 92px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-info p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: #6b7280;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.small-btn {
  padding: 9px 16px;
  color: #ffffff;
  background: #111827;
}

.search-panel {
  max-width: 680px;
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.96);
}

.search-panel input {
  padding: 15px 18px;
}

.search-panel button {
  padding: 15px 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 0;
  color: #6b7280;
  font-size: 14px;
}

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

.detail-top {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 38px 0 34px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  background: #e5e7eb;
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

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

.detail-info .hero-kicker {
  color: #374151;
  border-color: #d1d5db;
  background: #f3f4f6;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.detail-line {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span {
  color: #4b5563;
  background: #f3f4f6;
}

.detail-info .primary-btn {
  margin-top: 22px;
  color: #ffffff;
  background: #111827;
}

.player-section {
  padding: 18px 0 38px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.18);
}

.movie-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  font-size: 32px;
}

.player-cover strong {
  max-width: 80%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 24px;
}

.player-cover em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.player-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 26px;
  background: #ffffff;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
  text-align: justify;
}

.review-card {
  background: linear-gradient(135deg, #f9fafb, #ffffff);
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-copy {
  max-width: 520px;
  color: #6b7280;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: #6b7280;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid #e5e7eb;
  padding: 18px;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

  .hero-inner {
    grid-template-columns: 1fr 240px;
  }

  .category-grid,
  .detail-content,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .top-search,
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .hero-slider,
  .hero-stage,
  .hero-inner {
    min-height: 620px;
  }

  .hero-inner {
    display: flex;
    align-items: flex-end;
    padding-bottom: 130px;
  }

  .hero-poster {
    display: none;
  }

  .hero-thumbs {
    grid-template-columns: 1fr 1fr;
    margin-top: -116px;
  }

  .hero-thumb:nth-child(n + 5) {
    display: none;
  }

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

  .category-card,
  .detail-top,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .ranking-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .filter-bar {
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text em {
    display: none;
  }

  .hero-copy p,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

  .hero-controls {
    bottom: 128px;
  }

  .hero-thumbs {
    display: none;
  }

  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-cover {
    max-width: 260px;
  }

  .content-card {
    padding: 20px;
  }
}
