:root {
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: #d1fae5;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f9fafb;
  --dark: #020617;
  --radius: 22px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fffb 0%, #f9fafb 42%, #ffffff 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

main {
  min-height: 70vh;
}

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

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--ink);
  white-space: nowrap;
}

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

.logo-text {
  font-size: 22px;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #059669, #0f766e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #065f46;
  background: #ecfdf5;
  transform: translateY(-1px);
}

.header-search {
  width: 220px;
}

.header-search input,
.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  height: 40px;
  padding: 0 15px;
}

.header-search input:focus,
.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #ecfdf5;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: #047857;
}

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.015);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide > img,
.page-hero > img,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient,
.page-hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.58) 45%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 58px;
  color: #ffffff;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(5, 150, 105, 0.16);
  border: 1px solid rgba(167, 243, 208, 0.28);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  font-size: 18px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #065f46;
  background: #d1fae5;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.ghost-button,
.section-action,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0f766e);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.32);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover,
.home-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(16px);
}

.hero-controls button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.hero-controls > button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 26px;
  line-height: 1;
}

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

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

.hero-dot.is-active {
  width: 28px;
  background: #10b981;
}

.home-search-wrap {
  width: min(1040px, calc(100% - 32px));
  margin: -36px auto 0;
  position: relative;
  z-index: 10;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  border: 1px solid #d1fae5;
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.home-search input {
  height: 54px;
  padding: 0 20px;
  font-size: 16px;
}

.home-search button {
  border: 0;
  cursor: pointer;
  font-size: 16px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-links a {
  padding: 8px 13px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-weight: 800;
  font-size: 13px;
}

.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-action {
  min-height: 40px;
  color: #047857;
  background: #ecfdf5;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #065f46;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.75));
}

.category-card strong,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
  color: #ffffff;
}

.category-card strong {
  bottom: 42px;
  font-size: 25px;
  font-style: normal;
  font-weight: 950;
}

.category-card em {
  bottom: 18px;
  font-size: 13px;
  font-style: normal;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(209, 250, 229, 0.78);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  background: #064e3b;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.0) 42%, rgba(2, 6, 23, 0.74) 100%);
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  left: 12px;
  padding: 6px 10px;
  background: rgba(5, 150, 105, 0.88);
}

.rank-badge {
  right: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.95);
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover,
.detail-side a:hover {
  color: var(--brand);
}

.movie-meta {
  margin: 0 0 10px;
  color: #059669;
  font-size: 13px;
  font-weight: 800;
}

.movie-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-compact .movie-card-body {
  padding: 13px;
}

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

.two-column-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.stack-list,
.rank-grid {
  display: grid;
  gap: 15px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(209, 250, 229, 0.85);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.horizontal-cover {
  border-radius: 16px;
  overflow: hidden;
  background: #064e3b;
}

.horizontal-cover img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.horizontal-body {
  position: relative;
  min-width: 0;
}

.horizontal-body h3 {
  margin: 4px 0 8px;
  font-size: 18px;
  font-weight: 950;
}

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

.horizontal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.horizontal-meta span,
.rank-number {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 900;
}

.rank-number {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.page-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: #ffffff;
  background: radial-gradient(circle at 20% 15%, #0f766e, #020617 62%);
}

.page-hero > div:not(.page-hero-overlay) {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
  margin-left: max(16px, calc((100% - 1240px) / 2));
}

.small-hero {
  min-height: 360px;
}

.rank-hero {
  background: linear-gradient(135deg, #022c22 0%, #064e3b 44%, #111827 100%);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid #d1fae5;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.filter-search input,
.filter-panel select {
  height: 46px;
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-selects select {
  min-width: 138px;
}

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

.category-block {
  margin-bottom: 34px;
  padding: 24px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid #d1fae5;
  box-shadow: var(--shadow);
}

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

.category-block-head span {
  color: #059669;
  font-weight: 900;
}

.category-block-head h2 {
  margin: 6px 0 8px;
  font-size: 28px;
  font-weight: 950;
}

.category-block-head p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  color: #ffffff;
  background: var(--dark);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.detail-cover {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

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

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 800;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.4);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.25);
  border: 1px solid rgba(5, 150, 105, 0.34);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #0f766e);
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.35);
  font-size: 32px;
}

.play-layer strong {
  font-size: 18px;
  letter-spacing: 0.12em;
}

.detail-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
}

.detail-text article,
.detail-side {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid #d1fae5;
  box-shadow: var(--shadow);
}

.detail-text h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 950;
}

.detail-text p {
  margin: 0 0 22px;
  color: #374151;
  line-height: 2;
  font-size: 16px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 16px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
  font-weight: 800;
}

.site-footer {
  margin-top: 84px;
  padding: 42px 0;
  color: #d1fae5;
  background: #022c22;
}

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

.footer-logo {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  color: rgba(209, 250, 229, 0.75);
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .two-column-section,
  .detail-text {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .main-nav {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: 18px;
    background: #f0fdf4;
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .header-search {
    margin-left: auto;
    width: min(42vw, 240px);
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
  }

  .hero-poster {
    width: 210px;
    transform: none;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    padding: 42px 0;
  }

  .detail-cover {
    width: min(260px, 70vw);
  }

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

  .filter-selects {
    flex-wrap: wrap;
  }

  .filter-selects select {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .header-search {
    order: 3;
    width: 100%;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 40px;
  }

  .hero {
    height: 760px;
  }

  .hero-desc,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

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

  .content-section {
    padding-top: 52px;
  }

  .section-heading,
  .category-block-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .horizontal-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .horizontal-cover img {
    height: 128px;
  }

  .page-hero > div:not(.page-hero-overlay) {
    margin: 0 auto;
    width: min(100% - 32px, 1240px);
  }

  .detail-text article,
  .detail-side,
  .category-block {
    padding: 20px;
  }
}

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