* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #111827;
  background: #f8fafc;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #059669, #0d9488);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 15px;
  background: linear-gradient(135deg, #059669, #0d9488);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.32);
}

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

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #14b8a6);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #ecfdf5;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #047857;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-link:hover {
  color: #047857;
  background: #ecfdf5;
}

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

.hero-slider {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.42fr);
  align-items: center;
  gap: 52px;
  width: 100%;
  min-height: 680px;
  padding: 96px max(32px, calc((100vw - 1180px) / 2)) 116px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  color: #ffffff;
}

.eyebrow,
.inner-hero span,
.section-heading span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #ecfdf5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(167, 243, 208, 0.25);
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 14px;
  color: #a7f3d0;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.16;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #d1fae5;
  font-size: 17px;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #047857;
  font-size: 13px;
  font-weight: 700;
  background: #d1fae5;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-btn,
.ghost-btn,
.full-link,
.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0d9488);
  box-shadow: 0 18px 35px rgba(5, 150, 105, 0.35);
}

.primary-btn:hover,
.full-link:hover,
.row-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(5, 150, 105, 0.38);
}

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

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

.hero-poster {
  position: relative;
  width: min(360px, 100%);
  justify-self: end;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 58px;
  z-index: 3;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: #10b981;
}

.hero-quick-links {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-quick-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

.section,
.inner-hero,
.detail-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 62px 0;
}

.compact-section {
  padding-top: 44px;
}

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

.section-heading h2,
.section-heading h1 {
  margin: 10px 0 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-heading a {
  color: #047857;
  font-weight: 800;
}

.inline-heading {
  align-items: start;
  display: block;
}

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

.category-card,
.index-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 178px;
  border-radius: 24px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

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

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

.category-card span,
.index-card strong,
.index-card span {
  position: relative;
  z-index: 1;
}

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

.category-card span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
}

.category-card strong,
.index-card strong {
  display: block;
  font-size: 21px;
  font-weight: 850;
}

.category-card em,
.index-card span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-style: normal;
}

.index-card {
  min-height: 220px;
  padding: 126px 20px 22px;
}

.index-card strong,
.index-card span {
  z-index: 2;
}

.catalog-tools {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.07);
}

.search-box {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

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

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d1fae5;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: #059669;
}

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

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

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

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

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

.movie-card.hidden,
.ranking-row.hidden {
  display: none;
}

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

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

.movie-card-large .poster-link img {
  aspect-ratio: 21 / 12;
}

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

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

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.24);
}

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #059669;
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 9px 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
}

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

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 9px;
  color: #065f46;
  font-size: 12px;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 34px;
}

.ranking-card {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.1);
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item a {
  display: grid;
  grid-template-columns: 30px 54px 1fr;
  align-items: center;
  gap: 12px;
}

.ranking-number {
  color: #059669;
  font-size: 20px;
  font-weight: 900;
}

.ranking-item img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-info strong,
.ranking-info em {
  display: block;
}

.ranking-info strong {
  color: #111827;
  line-height: 1.3;
}

.ranking-info em {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.full-link {
  width: 100%;
  margin-top: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0d9488);
}

.inner-hero {
  margin-top: 36px;
  padding: 58px;
  border-radius: 34px;
  color: #ffffff;
  background: radial-gradient(circle at 10% 20%, rgba(52, 211, 153, 0.32), transparent 34%), linear-gradient(135deg, #064e3b, #0f172a 62%, #111827);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
}

.inner-hero h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.inner-hero p {
  max-width: 760px;
  margin: 0;
  color: #d1fae5;
  font-size: 17px;
}

.ranking-rows {
  display: grid;
  gap: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.07);
}

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

.ranking-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: #6b7280;
  font-weight: 700;
}

.ranking-topline strong {
  color: #059669;
  font-size: 28px;
  line-height: 1;
}

.ranking-row h2 {
  margin: 8px 0 8px;
  font-size: 24px;
  line-height: 1.25;
}

.ranking-row p {
  margin: 0 0 12px;
  color: #4b5563;
}

.row-action {
  color: #ffffff;
  background: #059669;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  min-height: 620px;
  padding: 72px max(32px, calc((100vw - 1180px) / 2));
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 36px 84px rgba(0, 0, 0, 0.48);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #a7f3d0;
  font-weight: 800;
}

.detail-info h1 {
  max-width: 860px;
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #d1fae5;
  font-size: 18px;
}

.detail-meta {
  margin-bottom: 18px;
}

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

.player-section {
  padding-bottom: 30px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.32), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-icon {
  display: inline-flex;
  width: 76px;
  height: 76px;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0d9488);
  box-shadow: 0 22px 45px rgba(5, 150, 105, 0.42);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 20px;
}

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

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.07);
}

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

.content-card p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: linear-gradient(135deg, #0f172a, #111827 54%, #022c22);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 50px 0 34px;
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  -webkit-background-clip: initial;
  background: none;
}

.site-footer p {
  margin: 16px 0 0;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 15px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #34d399;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

  .two-column-section,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .site-nav {
    min-height: 64px;
  }

  .brand {
    font-size: 20px;
  }

  .hero-slider,
  .hero-slide {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 62px;
    padding-bottom: 136px;
  }

  .hero-poster {
    width: min(230px, 70%);
    justify-self: start;
    transform: none;
  }

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

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

  .inner-hero {
    padding: 36px 24px;
    border-radius: 26px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 42px;
    padding-bottom: 48px;
  }

  .detail-poster {
    width: min(260px, 78vw);
  }

  .ranking-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .ranking-cover img {
    width: 86px;
    height: 116px;
  }

  .row-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero h2 {
    font-size: 25px;
  }

  .hero p,
  .inner-hero p,
  .one-line {
    font-size: 15px;
  }

  .movie-grid,
  .small-grid,
  .catalog-grid,
  .featured-grid,
  .category-grid,
  .index-grid {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 14px;
  }

  .detail-info h1 {
    font-size: 34px;
  }

  .section {
    padding: 42px 0;
  }

  .player-icon {
    width: 64px;
    height: 64px;
    font-size: 25px;
  }
}
