:root {
  --site-emerald: #059669;
  --site-emerald-dark: #047857;
  --site-emerald-soft: #ecfdf5;
  --site-text: #111827;
  --site-muted: #6b7280;
  --site-border: #e5e7eb;
  --site-bg: #f9fafb;
  --site-card: #ffffff;
  --site-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--site-border);
  backdrop-filter: blur(12px);
}

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

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--site-emerald), #14b8a6);
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.25);
}

.logo-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--site-text);
  line-height: 1.1;
}

.logo-subtitle {
  display: block;
  margin-top: -1px;
  font-size: 12px;
  color: var(--site-muted);
}

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

.nav-link {
  position: relative;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -22px;
  width: 100%;
  height: 2px;
  background: var(--site-emerald);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--site-emerald);
}

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

.mobile-menu-button {
  display: none;
  padding: 9px 12px;
  border-radius: 10px;
  color: #374151;
  background: #f3f4f6;
}

.mobile-nav {
  display: none;
  padding: 0 0 16px;
}

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

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

.hero {
  position: relative;
  height: 60vh;
  min-height: 500px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  z-index: 2;
}

.hero-copy {
  width: min(100%, 780px);
  padding: 0 0 68px;
  color: white;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.86);
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.28);
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.02;
  text-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.75;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

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

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  color: white;
  background: var(--site-emerald);
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.28);
}

.button-primary:hover {
  background: var(--site-emerald-dark);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.34);
}

.button-secondary {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-dots-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32px;
  z-index: 5;
  pointer-events: none;
}

.hero-dots-wrap .hero-dots {
  pointer-events: auto;
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: all 0.25s ease;
}

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

.page-main {
  padding: 48px 0 64px;
}

.section {
  margin-bottom: 64px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--site-text);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.section-title .title-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--site-emerald);
  background: var(--site-emerald-soft);
}

.section-desc {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--site-muted);
  line-height: 1.8;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--site-emerald);
  font-weight: 800;
}

.section-more:hover {
  color: var(--site-emerald-dark);
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card.is-hidden {
  display: none;
}

.movie-card-link {
  display: block;
  height: 100%;
  color: inherit;
}

.poster-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.64), transparent 70%);
  transition: opacity 0.3s ease;
}

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

.movie-card-link:hover .poster-frame::after,
.movie-card-link:hover .play-badge {
  opacity: 1;
}

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  color: white;
  font-size: 40px;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: white;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: rgba(5, 150, 105, 0.9);
}

.movie-info {
  padding: 12px 2px 0;
}

.movie-info h3 {
  margin: 0;
  color: var(--site-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
  color: var(--site-emerald);
}

.movie-meta,
.movie-small-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--site-muted);
  font-size: 13px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
}

.movie-one-line {
  margin: 8px 0 0;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-panel {
  padding: 40px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

.category-card {
  display: block;
  min-height: 132px;
  padding: 20px;
  border: 1px solid #d1fae5;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: #6ee7b7;
  box-shadow: var(--site-shadow);
}

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

.category-card p {
  margin: 0;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.7;
}

.category-count {
  display: inline-flex;
  margin-top: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--site-border);
  border-radius: 18px;
  background: white;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--site-border);
  border-radius: 12px;
  color: var(--site-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--site-emerald);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.filter-chip {
  padding: 8px 12px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: white;
  background: var(--site-emerald);
}

.search-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  color: #047857;
  background: #ecfdf5;
  font-weight: 900;
  white-space: nowrap;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 76px 180px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--site-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.rank-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--site-emerald);
  text-align: center;
}

.rank-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
}

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

.rank-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.rank-title a:hover {
  color: var(--site-emerald);
}

.rank-desc {
  margin: 0;
  color: var(--site-muted);
  line-height: 1.7;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-score {
  padding: 10px 14px;
  border-radius: 14px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 900;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--site-muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--site-emerald);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 32px;
  align-items: start;
}

.detail-card,
.side-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.detail-body,
.side-body {
  padding: 28px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f172a;
}

.player-start {
  position: absolute;
  inset: auto auto 24px 24px;
  z-index: 4;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  color: white;
  background: var(--site-emerald);
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.3);
}

.player-start:hover {
  background: var(--site-emerald-dark);
}

.player-status {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 84px;
  z-index: 4;
  color: #d1d5db;
  font-size: 13px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.15;
}

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

.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.detail-section p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.review-box {
  padding: 20px;
  border-left: 4px solid var(--site-emerald);
  border-radius: 0 14px 14px 0;
  background: #f9fafb;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-item {
  padding: 6px 10px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 800;
}

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

.related-item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
}

.related-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #e5e7eb;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-title {
  margin: 0 0 6px;
  color: var(--site-text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
}

.related-item:hover .related-title {
  color: var(--site-emerald);
}

.related-meta {
  color: var(--site-muted);
  font-size: 12px;
}

.empty-tip {
  display: none;
  padding: 32px;
  border-radius: 18px;
  color: var(--site-muted);
  background: white;
  text-align: center;
}

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

.site-footer {
  margin-top: 64px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-title {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.footer-text {
  max-width: 560px;
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

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

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

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

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

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero {
    min-height: 540px;
  }

  .hero-copy {
    padding-bottom: 42px;
  }

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

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

  .category-panel {
    padding: 24px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 52px 1fr;
  }

  .rank-thumb,
  .rank-score {
    display: none;
  }

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

  .related-item {
    grid-template-columns: 96px 1fr;
  }
}
