* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #111827;
  background: #f8fafc;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  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.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  width: min(1280px, 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-weight: 800;
  color: #064e3b;
  letter-spacing: 0.02em;
}

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex: 1;
}

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #065f46;
}

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

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

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

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

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, #059669, #0d9488, #06b6d4);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: overlay;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 44, 34, 0.78), rgba(4, 120, 87, 0.52), rgba(8, 145, 178, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  padding: 70px 0 118px;
}

.hero-pill,
.detail-pill,
.poster-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-pill {
  padding: 6px 16px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  font-size: clamp(30px, 4.5vw, 50px);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  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: #047857;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

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

.hero-tools {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-search,
.filter-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  color: #111827;
  background: #ffffff;
}

.hero-search input {
  width: min(460px, 52vw);
  padding: 0 18px;
}

.hero-search button {
  border: 0;
  padding: 0 22px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #059669, #0d9488);
}

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

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

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

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

.muted-section {
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

.content-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 900;
}

.section-heading p {
  margin: 0;
  color: #6b7280;
}

.section-more {
  flex: 0 0 auto;
  color: #047857;
  font-weight: 800;
}

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

.poster-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
}

.poster-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.poster-media {
  position: relative;
  height: 210px;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #064e3b, #0f766e);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  color: #047857;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.poster-year {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  font-size: 12px;
  font-weight: 700;
}

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

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

.poster-body {
  flex: 1;
  padding: 18px;
}

.poster-body h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.poster-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.poster-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #9ca3af;
}

.poster-card-compact .poster-media {
  height: 180px;
}

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

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

.category-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 24px;
  background: #064e3b;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.category-card a,
.category-card img,
.category-card-shade {
  position: absolute;
  inset: 0;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.category-card-shade {
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.1), rgba(6, 78, 59, 0.94));
}

.category-card-body {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  color: #ffffff;
}

.category-card-body h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card-body p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-preview span {
  max-width: 150px;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.16);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

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

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

.rank-row {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.rank-row a {
  display: grid;
  grid-template-columns: 56px 96px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0d9488);
  font-weight: 900;
}

.rank-row img {
  width: 96px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #064e3b;
}

.rank-main h3 {
  margin: 0 0 5px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

.rank-main p {
  margin: 0 0 5px;
  color: #6b7280;
  font-size: 13px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rank-main small {
  color: #6b7280;
}

.rank-play {
  padding: 8px 12px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 800;
}

.page-banner,
.detail-top {
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0d9488, #06b6d4);
}

.page-banner {
  padding: 60px 0 68px;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.crumb a:hover {
  color: #ffffff;
}

.page-banner h1,
.detail-headline h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-banner p,
.detail-headline p {
  max-width: 860px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

.filter-bar {
  margin-bottom: 32px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.filter-bar input,
.filter-bar select {
  min-height: 50px;
  padding: 0 16px;
  border-right: 1px solid #e5e7eb;
}

.filter-bar input {
  flex: 1;
}

.filter-bar select {
  min-width: 140px;
}

.filter-bar-wide input {
  min-width: 280px;
}

.empty-state {
  display: none;
  padding: 48px;
  border-radius: 20px;
  color: #6b7280;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.empty-state.is-visible {
  display: block;
}

.detail-top {
  padding: 42px 0 64px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-cover {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.26);
}

.detail-cover img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  background: #064e3b;
}

.detail-pill {
  margin-bottom: 14px;
  padding: 6px 14px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.16);
}

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

.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 700;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.28);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.3);
  font-size: 34px;
  text-indent: 5px;
}

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

.story-card,
.info-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.story-card {
  padding: 28px;
}

.story-card h2,
.info-card h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}

.story-card p {
  margin: 0;
  color: #374151;
  white-space: pre-line;
}

.info-card {
  padding: 22px;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-list div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  color: #374151;
  font-size: 14px;
}

.info-list strong {
  color: #111827;
}

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

.related-card {
  border-radius: 16px;
  border: 1px solid #edf2f7;
  background: #ffffff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
  background: #f9fafb;
  transform: translateY(-2px);
}

.related-link {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 12px;
}

.related-card figure {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #064e3b;
}

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card figure span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.related-card:hover figure span {
  opacity: 1;
}

.related-card h3 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 15px;
  font-weight: 850;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.related-card small {
  color: #059669;
  font-weight: 700;
}

.site-footer {
  padding: 46px 0;
  color: #d1fae5;
  background: #022c22;
}

.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

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

.site-footer p {
  max-width: 560px;
  margin: 10px 0 0;
  color: #a7f3d0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  max-width: 520px;
}

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

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

  .menu-toggle {
    display: inline-flex;
  }

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

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

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

@media (max-width: 760px) {
  .hero-slider,
  .hero-content {
    min-height: 620px;
  }

  .hero-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search input {
    width: 100%;
    min-width: 0;
  }

  .hero-dots {
    justify-content: center;
  }

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

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

  .rank-row a {
    grid-template-columns: 44px 76px 1fr;
  }

  .rank-row img {
    width: 76px;
    height: 62px;
  }

  .rank-play {
    display: none;
  }

  .filter-bar,
  .filter-bar-wide {
    display: grid;
    border-radius: 18px;
  }

  .filter-bar input,
  .filter-bar select,
  .filter-bar-wide input {
    min-width: 0;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

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

  .detail-cover img {
    height: 420px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .content-section {
    padding: 48px 0;
  }

  .poster-media {
    height: 230px;
  }

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

  .hero-content {
    padding-bottom: 148px;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .detail-cover img {
    height: 320px;
  }
}
