:root {
  --bg: #f9fafb;
  --paper: #ffffff;
  --paper-soft: #f0fdf4;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #16a34a;
  --green-deep: #166534;
  --green-dark: #052e16;
  --green-soft: #dcfce7;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #15803d 55%, #052e16);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

.main-nav a {
  padding: 8px 0;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--green);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--green-deep);
  background: #ffffff;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: #ffffff;
  background: var(--green-dark);
}

.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-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.52);
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 20%, rgba(34, 197, 94, 0.38), transparent 28%),
    linear-gradient(90deg, rgba(5, 46, 22, 0.95) 0%, rgba(5, 46, 22, 0.72) 46%, rgba(5, 46, 22, 0.22) 100%),
    linear-gradient(0deg, rgba(5, 46, 22, 0.82), transparent 42%);
}

.hero-content {
  position: relative;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.6fr);
  align-items: center;
  gap: 46px;
  padding: 92px 0 72px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: #16a34a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow,
.detail-hero .eyebrow {
  color: #86efac;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-copy .lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  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: #ffffff;
  background: linear-gradient(135deg, #22c55e, #16a34a 52%, #15803d);
  box-shadow: 0 16px 32px rgba(22, 163, 74, 0.32);
}

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

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(5, 46, 22, 0.42);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.section-block {
  padding: 58px 0;
}

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

.left-head {
  align-items: start;
  flex-direction: column;
  gap: 6px;
}

.section-head h2,
.filter-panel h2,
.feature-panel h2,
.detail-section h2,
.category-preview h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head a {
  color: var(--green);
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--green-dark);
  box-shadow: var(--shadow);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 46, 22, 0.18), rgba(5, 46, 22, 0.92));
}

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

.category-card span {
  display: block;
  margin-top: 108px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.wide-first {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.45fr);
}

.feature-panel,
.filter-panel,
.category-preview,
.detail-section,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.feature-panel {
  min-height: 100%;
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff, #f0fdf4);
}

.feature-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.sticky-panel {
  position: sticky;
  top: 96px;
}

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

.rank-list-large {
  grid-template-columns: 1fr;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #166534);
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 88px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy strong {
  font-size: 16px;
}

.rank-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
  padding: 24px;
  background:
    linear-gradient(135deg, #ffffff, #f8fffb),
    #ffffff;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px;
  gap: 12px;
}

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

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.88);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.card-body {
  padding: 15px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-body h3 {
  margin: 8px 0 6px;
  font-size: 17px;
  line-height: 1.32;
}

.card-body p {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  color: #dcfce7;
  background: rgba(255, 255, 255, 0.14);
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 70% 10%, rgba(34, 197, 94, 0.32), transparent 32%),
    linear-gradient(135deg, #052e16, #14532d 55%, #166534);
}

.page-hero .site-shell {
  padding: 88px 0;
}

.compact-hero .site-shell {
  padding: 70px 0;
}

.category-preview-list {
  padding: 48px 0;
}

.category-preview {
  margin-bottom: 24px;
  padding: 26px;
}

.category-preview > p {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.side-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.side-links a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #166534;
  background: #ffffff;
  font-weight: 800;
}

.detail-hero {
  padding: 60px 0;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.detail-copy .detail-meta {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.78);
}

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

.detail-section {
  margin-bottom: 24px;
  padding: 28px;
}

.detail-section p {
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(5, 46, 22, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

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

.player-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #15803d);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 22px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.site-footer {
  padding: 42px 0;
  color: #d1fae5;
  background: #052e16;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 24px;
}

.footer-brand {
  color: #ffffff;
}

.site-footer p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
}

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

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

@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content,
  .detail-layout,
  .split-layout,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 70vw);
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .rank-list,
  .preview-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .hero,
  .hero-content {
    min-height: 680px;
  }

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

  .hero-control {
    top: auto;
    bottom: 18px;
    transform: none;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    font-size: 12px;
  }

  .section-block {
    padding: 38px 0;
  }

  .rank-item {
    grid-template-columns: 34px 64px minmax(0, 1fr);
  }

  .rank-item img {
    width: 64px;
    height: 78px;
  }
}
