* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #111827;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

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

.site-logo {
  flex: 0 0 auto;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #059669, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 30px;
}

.desktop-nav {
  display: flex;
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  color: #059669;
  background: #ecfdf5;
  transform: translateY(-1px);
}

.mobile-only {
  display: none;
}

.search-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.search-panel.open,
.mobile-nav.open {
  display: block;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input,
.filter-search input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 12px 14px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.search-form button,
.filter-search button,
.filter-group button {
  border: 0;
  border-radius: 14px;
  padding: 11px 18px;
  color: #ffffff;
  background: #059669;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-form button:hover,
.filter-search button:hover,
.filter-group button:hover,
.filter-group button.active {
  background: #047857;
  transform: translateY(-1px);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid #e5e7eb;
}

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

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

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

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 30% 20%, #0f766e 0%, #020617 62%);
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: center;
  padding: 72px 0;
}

.hero-text {
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.2);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}

.hero-text h1,
.inner-shell h1,
.detail-info h1 {
  margin: 0;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.hero-text h1 {
  max-width: 800px;
  color: #ffffff;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 900;
}

.hero-text p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-tags,
.tag-cloud,
.detail-meta,
.card-meta,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-cloud span,
.detail-meta span,
.pill-row em {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

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

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

.primary-button,
.secondary-button,
.cta-section a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.cta-section a {
  color: #ffffff;
  background: #059669;
  box-shadow: 0 16px 40px rgba(5, 150, 105, 0.32);
}

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

.primary-button:hover,
.secondary-button:hover,
.cta-section a:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-stack {
  display: grid;
  gap: 16px;
}

.content-section {
  padding: 72px 0;
}

.content-section.white {
  background: #ffffff;
}

.content-section.soft-emerald {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 50%, #ecfeff 100%);
}

.content-section.soft-blue {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
}

.content-section.soft-amber {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}

.section-shell,
.inner-shell,
.detail-shell,
.footer-grid,
.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow-shell {
  width: min(980px, calc(100% - 32px));
}

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2,
.narrow-shell h2,
.detail-copy h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: #ecfdf5;
}

.section-more {
  color: #059669;
  font-weight: 800;
}

.section-more span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.section-more:hover span {
  transform: translateX(4px);
}

.card-grid {
  display: grid;
  gap: 18px;
}

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

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

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.13);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #0f766e 0%, #111827 68%);
}

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

.movie-card:hover .card-cover img,
.featured-card:hover img {
  transform: scale(1.08);
}

.card-shade,
.featured-layer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.24s ease;
}

.movie-card:hover .card-shade {
  background: rgba(0, 0, 0, 0.34);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.35);
}

.card-body {
  display: block;
  padding: 14px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: #059669;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  margin-top: 8px;
  overflow: hidden;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin-top: 12px;
  color: #059669;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.detail-meta span {
  background: #ecfdf5;
}

.movie-card.compact .card-desc {
  display: none;
}

.movie-card.compact .card-body strong {
  min-height: 40px;
  font-size: 14px;
}

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

.featured-card {
  position: relative;
  display: block;
  min-height: 380px;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.featured-layer {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 8%, rgba(0, 0, 0, 0.72) 100%);
}

.featured-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 28px;
  color: #ffffff;
}

.pill-row {
  margin-bottom: 12px;
}

.pill-row em {
  color: #ffffff;
  background: rgba(5, 150, 105, 0.9);
}

.featured-content strong {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1.15;
}

.featured-content span:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-panel,
.category-overview-card a {
  display: grid;
  gap: 12px;
  min-height: 148px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-panel:hover,
.category-overview-card a:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

.category-panel span,
.category-overview-card span {
  color: #059669;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.category-panel strong,
.category-overview-card p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.7;
}

.cta-section {
  padding: 78px 16px;
  color: #ffffff;
  background: linear-gradient(90deg, #059669, #0d9488);
  text-align: center;
}

.cta-section div {
  width: min(900px, 100%);
  margin: 0 auto;
}

.cta-section h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -0.05em;
}

.cta-section p {
  margin: 18px auto 28px;
  color: #d1fae5;
  font-size: 20px;
  line-height: 1.7;
}

.cta-section a {
  background: #ffffff;
  color: #047857;
}

.inner-hero,
.detail-hero {
  color: #ffffff;
  background: radial-gradient(circle at 15% 5%, rgba(16, 185, 129, 0.7) 0%, rgba(15, 23, 42, 0.98) 42%, #020617 100%);
}

.inner-hero {
  padding: 92px 0;
}

.inner-shell h1 {
  max-width: 900px;
  font-size: clamp(42px, 5vw, 64px);
}

.inner-shell p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #d1d5db;
  font-size: 20px;
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

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

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-group strong {
  margin-right: 4px;
  color: #111827;
}

.filter-group button {
  padding: 8px 13px;
  color: #047857;
  background: #ecfdf5;
}

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

.detail-hero {
  padding: 36px 0 82px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: #d1d5db;
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.poster-card {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  background: radial-gradient(circle at 30% 20%, #0f766e 0%, #111827 68%);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

.detail-info h1 {
  max-width: 900px;
  color: #ffffff;
  font-size: clamp(38px, 5vw, 60px);
}

.detail-lead {
  max-width: 820px;
  margin: 22px 0 0;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.75;
}

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

.detail-meta span {
  color: #a7f3d0;
}

.tag-cloud {
  margin-top: 22px;
}

.tag-cloud span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.player-box {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(5, 150, 105, 0.36) 0%, rgba(2, 6, 23, 0.42) 46%, rgba(2, 6, 23, 0.72) 100%);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: #059669;
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.38);
  transform: scale(1);
  transition: transform 0.2s ease;
}

.player-overlay:hover span {
  transform: scale(1.08);
}

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

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

.detail-copy article {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.detail-copy p {
  margin: 16px 0 0;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.9;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.prev-next a {
  display: block;
  padding: 18px 20px;
  border-radius: 18px;
  color: #047857;
  background: #ecfdf5;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.prev-next a:hover {
  background: #d1fae5;
  transform: translateY(-2px);
}

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

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

.footer-brand h2 {
  margin: 0 0 14px;
  font-size: 30px;
  background: linear-gradient(90deg, #059669, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-brand p,
.site-footer li a,
.footer-bottom {
  color: #6b7280;
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #111827;
}

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

.site-footer li a:hover {
  color: #059669;
}

.footer-bottom {
  padding: 22px 0;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .compact-grid,
  .library-grid,
  .rank-grid,
  .rank-page-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

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

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

  .mobile-only {
    display: inline-grid;
  }

  .hero-content {
    padding: 58px 0;
  }

  .hero-stack,
  .wide-grid,
  .featured-grid,
  .category-grid,
  .category-overview-grid,
  .detail-copy,
  .prev-next,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .compact-grid,
  .library-grid,
  .rank-grid,
  .rank-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .poster-card {
    width: min(340px, 100%);
  }
}

@media (max-width: 560px) {
  .site-logo {
    font-size: 22px;
  }

  .nav-shell {
    width: min(100% - 22px, 1280px);
  }

  .hero-section,
  .hero-content {
    min-height: auto;
  }

  .hero-content,
  .inner-hero,
  .detail-hero,
  .content-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.72) 100%);
  }

  .compact-grid,
  .library-grid,
  .rank-grid,
  .rank-page-grid {
    gap: 14px;
  }

  .card-body {
    padding: 11px;
  }

  .card-desc,
  .movie-card.compact .card-meta {
    display: none;
  }

  .filter-search,
  .search-form {
    flex-direction: column;
  }

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

  .player-overlay span {
    width: 64px;
    height: 64px;
  }
}
