:root {
  --green-950: #052e22;
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --green-300: #6ee7b7;
  --green-100: #d1fae5;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.10);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

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(--slate-900);
  background: #f8fafc;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--white);
  background: linear-gradient(90deg, var(--green-950), var(--green-800));
  box-shadow: 0 16px 36px rgba(5, 46, 34, 0.26);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 70px;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--green-950);
  background: linear-gradient(135deg, var(--green-300), var(--green-500));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4), 0 8px 22px rgba(16,185,129,0.28);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--green-300);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  font-weight: 650;
  opacity: 0.86;
  transition: color .2s ease, opacity .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--green-300);
  opacity: 1;
}

.search-form,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: 12px;
  outline: none;
  color: var(--white);
  background: rgba(6, 95, 70, 0.66);
  padding: 10px 13px;
  min-width: 190px;
}

.search-form input::placeholder,
.mobile-search input::placeholder {
  color: rgba(209, 250, 229, 0.78);
}

.search-form button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-bar button,
.player-cover {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.search-form button,
.mobile-search button {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--white);
  background: var(--green-700);
  transition: background .2s ease, transform .2s ease;
}

.search-form button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255,255,255,0.12);
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-panel {
  border-top: 1px solid rgba(110, 231, 183, 0.18);
  background: rgba(5, 46, 34, 0.98);
}

.mobile-panel-inner {
  display: grid;
  gap: 12px;
  padding: 16px 0 20px;
}

.mobile-link {
  padding: 9px 0;
  color: var(--green-100);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .65s ease, visibility .65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.80)), linear-gradient(0deg, rgba(2,6,23,0.96), transparent 42%);
}

.hero-content {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 620px;
  padding: 90px 0 84px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--green-100);
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(110, 231, 183, 0.28);
  font-weight: 700;
  letter-spacing: .04em;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: rgba(241, 245, 249, 0.88);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 32px;
}

.hero-meta span,
.detail-chip,
.tag-row span,
.info-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 650;
}

.hero-meta span {
  color: var(--green-100);
  border: 1px solid rgba(110, 231, 183, 0.28);
  background: rgba(5, 150, 105, 0.16);
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

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

.secondary-button {
  color: var(--green-100);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  z-index: 3;
}

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--green-300);
}

.main-section {
  padding: 64px 0;
}

.main-section.surface {
  background: var(--white);
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.section-heading p {
  margin: 0;
  color: var(--slate-500);
}

.section-more {
  color: var(--green-700);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform .24s ease, box-shadow .24s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--slate-200);
}

.poster-wide {
  aspect-ratio: 16 / 9;
}

.poster img,
.compact-poster img,
.related-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .48s ease;
}

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

.card-badge,
.card-type {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.card-badge {
  right: 12px;
}

.card-type {
  left: 12px;
  background: rgba(5, 150, 105, 0.9);
}

.card-content {
  padding: 16px;
}

.card-content h2,
.card-content h3 {
  margin: 4px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.card-content h2 a:hover,
.card-content h3 a:hover,
.compact-card a:hover,
.related-card a:hover {
  color: var(--green-700);
}

.card-content p {
  margin: 0 0 10px;
  color: var(--slate-600);
  font-size: 14px;
}

.card-meta {
  color: var(--slate-500) !important;
  font-size: 13px !important;
}

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

.tag-row span {
  color: var(--green-800);
  background: var(--green-100);
  padding: 4px 9px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: var(--radius-md);
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-900), var(--green-600));
  box-shadow: var(--shadow-card);
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
}

.category-block {
  margin-bottom: 52px;
}

.category-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.category-title-row h2 {
  margin: 0;
}

.category-title-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(148,163,184,.6), transparent);
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(16,185,129,0.24), transparent 34%), linear-gradient(135deg, var(--slate-950), var(--green-950));
  padding: 76px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(241,245,249,.84);
  font-size: 18px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: -28px auto 34px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
  flex: 1 1 220px;
  color: var(--slate-900);
  background: var(--slate-100);
  border-color: var(--slate-200);
}

.filter-bar button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--white);
  background: var(--green-700);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 150px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: var(--green-950);
  background: linear-gradient(135deg, var(--green-300), var(--green-500));
  font-size: 24px;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  height: 86px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--slate-200);
}

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

.rank-main h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-main p {
  margin: 0;
  color: var(--slate-600);
}

.rank-link {
  color: var(--green-700);
  font-weight: 900;
}

.detail-hero {
  color: var(--white);
  background: linear-gradient(120deg, var(--slate-950), var(--green-950));
  padding: 56px 0 42px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(209,250,229,.86);
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  background: var(--slate-800);
  box-shadow: 0 26px 60px rgba(0,0,0,.35);
}

.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.detail-intro p {
  max-width: 780px;
  margin: 0 0 20px;
  color: rgba(241,245,249,.86);
  font-size: 18px;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.detail-chip {
  color: var(--green-100);
  background: rgba(16,185,129,.16);
  border: 1px solid rgba(110,231,183,.28);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 34px;
}

.content-panel,
.side-panel {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.content-panel {
  padding: 24px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-panel p {
  margin: 0 0 18px;
  color: var(--slate-700);
  font-size: 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
  margin-bottom: 28px;
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2,6,23,.12), rgba(2,6,23,.82));
  transition: opacity .2s ease, visibility .2s ease;
}

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

.player-cover span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: var(--green-950);
  background: var(--green-300);
  font-size: 30px;
  box-shadow: 0 16px 38px rgba(16, 185, 129, 0.35);
}

.player-cover strong {
  font-size: 20px;
}

.side-panel {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 94px;
}

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

.related-card,
.compact-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.related-poster,
.compact-poster {
  display: block;
  height: 72px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--slate-200);
}

.related-card h3,
.compact-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.related-card p,
.compact-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 12px;
}

.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.info-chip {
  color: var(--slate-700);
  background: var(--slate-100);
}

.no-result {
  display: none;
  padding: 44px;
  text-align: center;
  color: var(--slate-500);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.no-result.is-visible {
  display: block;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), #020617);
}

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

.footer-brand {
  color: var(--white);
  font-weight: 900;
  font-size: 18px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

.site-footer p {
  margin: 12px 0 0;
  color: #94a3b8;
}

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

.site-footer a:hover {
  color: var(--green-300);
}

.footer-bottom {
  border-top: 1px solid rgba(148,163,184,.16);
  padding: 16px 0;
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 980px) {
  .desktop-nav,
  .search-form {
    display: none;
  }

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

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

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

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

  .side-panel {
    position: static;
  }

  .rank-item {
    grid-template-columns: 58px 112px 1fr;
  }

  .rank-link {
    grid-column: 3;
  }

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

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

  .header-inner {
    min-height: 64px;
  }

  .brand-text strong {
    font-size: 17px;
  }

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

  .hero-content {
    padding: 76px 0 74px;
  }

  .hero p,
  .page-hero p,
  .detail-intro p {
    font-size: 16px;
  }

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

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

  .filter-bar {
    margin-top: -18px;
  }

  .rank-item {
    grid-template-columns: 48px 1fr;
  }

  .rank-thumb {
    display: none;
  }

  .rank-link {
    grid-column: 2;
  }

  .related-card,
  .compact-card {
    grid-template-columns: 96px 1fr;
  }

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