* {
  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", sans-serif;
  color: #111827;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 50%, #f9fafb 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.95);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 16px 35px rgba(5, 150, 105, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

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

.nav-link,
.mobile-nav-link {
  color: #4b5563;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #374151;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px 18px;
  background: #ffffff;
}

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

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

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  background: #ecfdf5;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(16, 185, 129, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-inner,
.page-hero-inner,
.section,
.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.hero-copy {
  width: min(680px, 100%);
  padding-top: 24px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #ffffff;
  background: #059669;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.eyebrow {
  color: #047857;
  background: #d1fae5;
}

.hero h1 {
  margin: 18px 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
  max-width: 620px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  color: #065f46;
  background: #d1fae5;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.compact-actions {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: #059669;
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.32);
}

.btn-primary:hover {
  background: #047857;
}

.btn-soft {
  color: #064e3b;
  background: #ffffff;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-next {
  right: 24px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: 72px 0;
}

.section + .section {
  padding-top: 16px;
}

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

.section-head.centered {
  max-width: 780px;
  margin: 0 auto 26px;
  align-items: center;
  text-align: center;
  flex-direction: column;
}

.section-head h2,
.page-hero h1,
.detail-panel h1 {
  margin: 12px 0 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
  color: #6b7280;
  line-height: 1.8;
}

.section-link,
.text-link {
  color: #059669;
  font-weight: 800;
}

.section-search {
  padding-bottom: 36px;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  padding: 0 16px;
  height: 52px;
  border-radius: 16px;
  background: #f3f4f6;
}

.search-input-wrap span {
  color: #059669;
  font-size: 22px;
}

.search-input-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

.filter-select {
  min-width: 128px;
  height: 52px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  color: #374151;
  background: #ffffff;
  padding: 0 12px;
  outline: 0;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #a7f3d0;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.13);
}

.movie-card-large {
  grid-column: span 2;
}

.poster-link,
.poster-frame {
  display: block;
}

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

.movie-card-large .poster-frame {
  aspect-ratio: 16 / 10;
}

.poster-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.95);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #047857;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 12px;
}

.card-meta a {
  color: #047857;
  font-weight: 800;
}

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

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

.card-body p {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.13);
}

.category-tile img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.07);
}

.category-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.78));
}

.category-tile-copy {
  position: absolute;
  inset-inline: 18px;
  bottom: 18px;
  color: #ffffff;
}

.category-tile-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-tile-copy em {
  display: block;
  color: #e5e7eb;
  font-style: normal;
  line-height: 1.6;
}

.ranking-section {
  padding-bottom: 92px;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: auto 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #047857;
  background: #d1fae5;
  font-weight: 900;
}

.rank-poster {
  width: 92px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-title {
  display: inline-block;
  margin-bottom: 6px;
  color: #111827;
  font-weight: 850;
  line-height: 1.35;
}

.rank-title:hover {
  color: #059669;
}

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

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  text-align: center;
  background:
    radial-gradient(circle at 18% 25%, rgba(16, 185, 129, 0.2), transparent 30%),
    linear-gradient(135deg, #f0fdf4 0%, #ffffff 56%, #ecfdf5 100%);
}

.slim-hero {
  padding: 82px 0 72px;
}

.category-hero {
  padding: 92px 0 78px;
}

.page-hero-inner {
  max-width: 820px;
}

.page-hero .eyebrow {
  margin-inline: auto;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.category-card-media {
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #111827;
}

.category-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 20px;
}

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

.category-card-body p {
  margin: 0 0 18px;
  color: #6b7280;
  line-height: 1.75;
}

.watch-stage {
  background: #000000;
}

.player-shell {
  position: relative;
  width: min(1280px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.32));
  cursor: pointer;
}

.play-layer[hidden] {
  display: none;
}

.play-layer span {
  width: clamp(72px, 9vw, 108px);
  height: clamp(72px, 9vw, 108px);
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #047857;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.35);
  font-size: clamp(28px, 4vw, 44px);
  padding-left: 6px;
}

.detail-section {
  padding-top: 36px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #6b7280;
}

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

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

.detail-panel,
.side-panel {
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.detail-panel {
  padding: clamp(24px, 4vw, 42px);
}

.side-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

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

.detail-meta a,
.detail-meta span {
  color: #047857;
  background: #d1fae5;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.detail-panel h1 {
  margin-bottom: 18px;
}

.detail-lead {
  margin: 0 0 18px;
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 650;
}

.detail-tags {
  margin-bottom: 30px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 30px 0 14px;
  font-size: 22px;
}

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

.detail-panel p {
  color: #374151;
  line-height: 1.9;
}

.review-box {
  border-left: 4px solid #10b981;
  border-radius: 18px;
  background: #f9fafb;
  padding: 18px 20px;
}

.review-box p {
  margin: 0;
}

.side-related {
  display: grid;
  gap: 12px;
}

.side-related .rank-card {
  grid-template-columns: 72px minmax(0, 1fr);
  padding: 10px;
  border-radius: 16px;
}

.side-related .rank-number {
  display: none;
}

.side-related .rank-poster {
  width: 72px;
}

.side-related .rank-info p {
  -webkit-line-clamp: 1;
  font-size: 13px;
}

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

.footer-inner {
  padding: 44px 0;
}

.footer-inner strong {
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  max-width: 780px;
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0;
}

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

.copyright {
  margin: 0;
  font-size: 13px;
}

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

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

  .side-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-inner {
    align-items: end;
    padding-bottom: 82px;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding: 52px 0;
  }

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

  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .movie-card-large {
    grid-column: span 2;
  }

  .ranking-list,
  .ranking-page-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .hero-inner,
  .page-hero-inner,
  .section,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cards-grid,
  .featured-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-large {
    grid-column: span 1;
  }

  .scroll-row {
    grid-auto-columns: minmax(220px, 82vw);
  }

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

  .rank-card {
    grid-template-columns: 32px 76px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-poster {
    width: 76px;
  }

  .detail-panel {
    padding: 22px;
  }

  .side-related .rank-card {
    grid-template-columns: 68px minmax(0, 1fr);
  }
}
