* {
  box-sizing: border-box;
}

:root {
  --green: #059669;
  --green-dark: #047857;
  --green-soft: #ecfdf5;
  --teal: #0f766e;
  --amber: #f59e0b;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(15, 118, 110, 0.14);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 28px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(245, 158, 11, 0.16), transparent 26rem),
    linear-gradient(180deg, #f8fffb 0%, #ffffff 42%, #f7fffb 100%);
}

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

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

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #064e3b;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, #059669, #0f766e 62%, #f59e0b);
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.nav-toggle,
.btn,
.pager-link,
.filter-pill {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-links a {
  padding: 10px 16px;
  color: #334155;
}

.nav-links a:hover,
.filter-pill:hover {
  color: var(--green-dark);
  background: var(--green-soft);
}

.nav-toggle {
  display: none;
  padding: 9px 14px;
  background: var(--green);
  color: #ffffff;
}

main {
  overflow: hidden;
}

.section,
.hero,
.detail-shell,
.list-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 36px 0 24px;
}

.hero-frame {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 38px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(5, 150, 105, 0.28), transparent 24rem),
    linear-gradient(90deg, rgba(6, 78, 59, 0.94) 0%, rgba(15, 23, 42, 0.66) 48%, rgba(15, 23, 42, 0.24) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 48%);
}

.hero-content {
  position: absolute;
  inset: auto auto 70px 58px;
  z-index: 2;
  width: min(650px, calc(100% - 72px));
  color: #ffffff;
}

.kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #065f46;
  background: rgba(209, 250, 229, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1,
.list-hero h1,
.detail-title h1 {
  margin: 18px 0 14px;
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content h1 {
  font-size: clamp(38px, 7vw, 78px);
}

.hero-content p {
  max-width: 590px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions,
.actions,
.footer-links,
.category-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 16px 34px rgba(5, 150, 105, 0.26);
}

.btn:hover,
.pager-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(5, 150, 105, 0.3);
}

.btn-ghost {
  color: #064e3b;
  background: rgba(255, 255, 255, 0.88);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 58px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

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

.quick-search {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 5;
  width: min(360px, calc(100% - 68px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.search-box {
  position: relative;
}

.search-box input,
.filter-panel input {
  width: 100%;
  border: 1px solid rgba(5, 150, 105, 0.18);
  outline: none;
  border-radius: 999px;
  padding: 14px 18px;
  color: #064e3b;
  background: rgba(255, 255, 255, 0.92);
  font-size: 15px;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.quick-links a,
.category-mini a {
  border-radius: 16px;
  padding: 10px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.section {
  padding: 58px 0;
}

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

.section-head h2,
.list-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.section-head p,
.list-hero p,
.detail-title p,
.category-card p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.34);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #fef3c7);
}

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

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

.card-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
}

.card-badge span,
.rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 26px;
  padding: 0 10px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--green);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.tag-row span,
.meta-pill,
.filter-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 78, 59, 0.84), rgba(6, 78, 59, 0.08));
}

.category-card-content {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 2;
  color: #ffffff;
}

.category-card h3 {
  margin: 0 0 6px;
  font-size: 21px;
}

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

.list-hero {
  padding: 54px 0 20px;
}

.list-hero-card,
.filter-panel,
.detail-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.list-hero-card {
  padding: 34px;
  background:
    radial-gradient(circle at 80% 8%, rgba(245, 158, 11, 0.18), transparent 22rem),
    linear-gradient(135deg, #ecfdf5, #ffffff 58%, #fff7ed);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 28px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-shell {
  padding: 40px 0 66px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 26px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  background: #020617;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--amber));
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
  font-size: 30px;
  cursor: pointer;
}

.player-meta {
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.92), rgba(15, 23, 42, 0.96));
}

.player-meta h2 {
  margin: 0 0 10px;
}

.detail-card {
  padding: 26px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 3 / 4;
  background: #ecfdf5;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title {
  margin-top: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.content-block {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.content-block h2 {
  margin: 0 0 12px;
}

.content-block p {
  margin: 0;
  color: #334155;
  line-height: 2;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}

.pager-link {
  flex: 1;
  padding: 14px 18px;
  color: #064e3b;
  background: #ecfdf5;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 38px 0;
}

.footer-links a {
  color: #047857;
  font-weight: 800;
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .movie-grid.compact {
    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) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-frame {
    min-height: 640px;
    border-radius: 28px;
  }

  .hero-content {
    left: 24px;
    bottom: 192px;
    width: calc(100% - 48px);
  }

  .hero-controls {
    left: 24px;
    bottom: 24px;
  }

  .quick-search {
    left: 24px;
    right: 24px;
    bottom: 70px;
    width: auto;
  }

  .section-head,
  .footer-inner,
  .filter-panel {
    display: block;
  }

  .filter-pills {
    margin-top: 12px;
  }

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

  .card-body {
    padding: 14px;
  }

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

  .card-body p {
    min-height: auto;
  }

  .list-hero-card,
  .detail-card {
    padding: 22px;
    border-radius: 26px;
  }

  .pager {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }
}
