:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #ecfdf5;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: #d1fae5;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: #374151;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.hero {
  min-height: 68vh;
  position: relative;
  overflow: hidden;
  background: #111827;
}

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

.hero-slide {
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-shade {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 68vh;
  margin: 0 auto;
  padding: 70px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.48);
}

.hero-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

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

.hero-tags span,
.detail-meta span,
.tag-cloud span,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 6px 12px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

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

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

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

.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 32px rgba(5, 150, 105, 0.28);
}

.btn.primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.34);
}

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

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 26px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.page-stack {
  padding: 48px 0;
}

.search-panel,
.section-block {
  margin-bottom: 54px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 20px;
  align-items: end;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 14px;
  color: var(--text);
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

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

.compact-row {
  align-items: center;
}

.section-title-row h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.more-link {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

.grid {
  display: grid;
}

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

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

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

.movie-card-link {
  display: block;
}

.thumb {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
  aspect-ratio: 16 / 9;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 3px 8px;
  font-size: 12px;
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 34px;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  transition: opacity 0.25s ease;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.card-body {
  padding-top: 12px;
}

.card-body h3,
.horizontal-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3,
.rank-row:hover h3 {
  color: var(--brand);
}

.pill-row {
  margin: 8px 0;
}

.pill {
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 4px 9px;
  font-weight: 700;
}

.pill.muted {
  background: #f3f4f6;
  color: var(--muted);
}

.meta-row {
  color: var(--muted);
  font-size: 13px;
}

.movie-card-horizontal {
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-horizontal:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.horizontal-link {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
}

.horizontal-thumb {
  border-radius: 0;
  height: 112px;
}

.horizontal-body {
  min-width: 0;
  padding: 12px 14px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.horizontal-body p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-band {
  margin-left: -24px;
  margin-right: -24px;
  padding: 34px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

.category-tile {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(5, 150, 105, 0.4);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 32px;
}

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

.ranking-mini {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
  align-self: start;
}

.ranking-mini ol,
.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-mini li + li {
  border-top: 1px solid var(--line);
}

.ranking-mini a {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
}

.ranking-mini span,
.rank-number {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 900;
}

.ranking-mini strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-mini em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 26px;
}

.movie-card-large .card-body h3 {
  font-size: 22px;
}

.subpage .page-stack {
  padding-top: 34px;
}

.page-hero {
  background: radial-gradient(circle at top left, rgba(5, 150, 105, 0.22), transparent 34%), linear-gradient(135deg, #111827, #0f172a);
  color: #fff;
}

.slim-hero .container {
  padding: 60px 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.06em;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

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

.category-overview-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 154px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

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

.category-overview-card div {
  padding: 22px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.category-overview-card span {
  color: var(--brand);
  font-weight: 800;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 42px 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-row img {
  width: 150px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 18px;
  transition: color 0.2s ease;
}

.rank-row p {
  margin: 0 0 8px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-rank .rank-number {
  background: var(--brand);
  color: #fff;
}

.detail-hero {
  padding: 56px 0;
  background: radial-gradient(circle at 15% 20%, rgba(5, 150, 105, 0.3), transparent 32%), linear-gradient(135deg, #0f172a, #111827);
  color: #fff;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 36px;
  align-items: end;
}

.poster-box {
  border-radius: 26px;
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow-strong);
}

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

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: #d1d5db;
}

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

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

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

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

.detail-meta span,
.tag-cloud span {
  background: rgba(255, 255, 255, 0.1);
}

.tag-cloud {
  margin-bottom: 24px;
}

.player-section {
  margin-bottom: 42px;
}

.video-player {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16 / 9;
}

.video-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.24));
  cursor: pointer;
}

.video-start span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.38);
  font-size: 34px;
}

.video-start strong {
  font-size: 20px;
}

.video-player.is-playing .video-start {
  display: none;
}

.video-error {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  margin: 0;
  color: #fecaca;
  text-align: center;
}

.prose-block {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.prose-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.prose-block h2:not(:first-child) {
  margin-top: 28px;
}

.prose-block p {
  margin: 0;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  font-weight: 700;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand .brand-text strong {
  color: #fff;
}

.footer-about p,
.site-footer a,
.copyright {
  color: #9ca3af;
}

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

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

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

  .overview-grid,
  .two-columns,
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-strong);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
    border-radius: 10px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--surface-soft);
  }

  .search-panel,
  .filter-controls,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .category-overview-card a,
  .rank-row a {
    grid-template-columns: 1fr;
  }

  .category-overview-card img,
  .rank-row img {
    width: 100%;
  }

  .poster-box {
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .hero,
  .hero-content {
    min-height: 78vh;
  }

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

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

  .horizontal-link {
    grid-template-columns: 128px 1fr;
  }

  .horizontal-thumb {
    height: 102px;
  }

  .feature-band {
    margin-left: 0;
    margin-right: 0;
  }

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