:root {
  --bg: #f9fafb;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

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

img {
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #22c55e);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.32);
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  transition: 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  padding: 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

.nav-search input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.nav-search button,
.btn.primary {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), #22c55e);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(22, 163, 74, 0.34);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

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

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img,
.detail-backdrop img,
.category-card-large img {
  width: 100%;
  height: 100%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, rgba(34, 197, 94, 0.26), transparent 34%), linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.2)), linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 120px 24px 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-tags,
.side-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.side-meta span,
.detail-tags a,
.card-badge,
.rank-mark {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #dcfce7;
  background: rgba(22, 163, 74, 0.25);
  border: 1px solid rgba(187, 247, 208, 0.24);
}

.hero-content h1 {
  max-width: 820px;
  margin: 24px 0 12px;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 900;
  color: #86efac;
}

.hero-content p {
  max-width: 720px;
  margin-top: 16px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.page-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;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 900;
  transition: 0.2s ease;
}

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

.btn.ghost:hover,
.btn.text:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn.text {
  color: #bbf7d0;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 34px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #22c55e;
}

.section-shell,
.footer-grid,
.footer-bottom,
.detail-container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-shell {
  padding-top: 64px;
  padding-bottom: 24px;
}

.surface,
.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.quick-search h2,
.filter-panel h2 {
  font-size: 26px;
  font-weight: 950;
}

.quick-search p,
.filter-panel p,
.section-title span,
.card-line,
.card-meta,
.category-tile em,
.category-large-content em,
.rank-text em,
.footer-grid p,
.footer-bottom {
  color: var(--muted);
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.filter-controls input,
.filter-controls select {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 0 16px;
  outline: 0;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

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

.section-title span {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.section-title a {
  color: var(--green-dark);
  font-weight: 900;
}

.compact-title {
  align-items: start;
  margin-bottom: 18px;
}

.compact-title h2 {
  font-size: 26px;
}

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

.category-tile {
  min-height: 140px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  border: 1px solid #dcfce7;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 21px;
  font-weight: 950;
}

.category-tile em {
  font-style: normal;
  line-height: 1.7;
}

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

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

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card img {
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease;
}

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

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

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
}

.rank-mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.66);
}

.card-info {
  display: block;
  padding: 14px;
}

.card-info strong {
  display: block;
  min-height: 28px;
  font-size: 16px;
  font-weight: 950;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-line {
  display: -webkit-box;
  margin: 8px 0;
  min-height: 42px;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-card .poster-wrap {
  aspect-ratio: 4 / 3;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.featured-panel,
.ranking-panel {
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f9fafb;
  transition: 0.2s ease;
}

.rank-row:hover {
  background: #f0fdf4;
}

.rank-number {
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 950;
}

.rank-row img {
  width: 72px;
  height: 56px;
  border-radius: 14px;
}

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

.rank-text strong {
  font-weight: 900;
}

.rank-text em {
  margin-top: 3px;
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  color: #fff;
  background: radial-gradient(circle at 75% 20%, rgba(34, 197, 94, 0.36), transparent 34%), linear-gradient(135deg, #020617, #0f172a 45%, #064e3b);
  overflow: hidden;
}

.page-hero > div {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 92px 24px 70px;
}

.page-hero span {
  color: #86efac;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-hero h1 {
  max-width: 860px;
  margin-top: 12px;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  margin-top: 16px;
  color: #d1d5db;
  line-height: 1.8;
  font-size: 18px;
}

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

.category-card-large {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  transition: 0.2s ease;
}

.category-card-large:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.2));
}

.category-large-content {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.category-large-content strong {
  display: block;
  font-size: 28px;
  font-weight: 950;
}

.category-large-content em {
  display: block;
  margin-top: 8px;
  color: #e5e7eb;
  font-style: normal;
  line-height: 1.7;
}

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

.wide-panel {
  grid-column: span 2;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #020617;
  color: #fff;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  filter: blur(3px);
}

.detail-backdrop:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72)), linear-gradient(0deg, #020617, transparent 60%);
}

.detail-container {
  position: relative;
  z-index: 1;
  padding-top: 42px;
  padding-bottom: 56px;
}

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #d1d5db;
  font-size: 14px;
}

.crumbs a {
  color: #bbf7d0;
  font-weight: 800;
}

.crumbs em {
  font-style: normal;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: stretch;
}

.player-panel,
.movie-side {
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.28), rgba(2, 6, 23, 0.62));
  z-index: 3;
}

.player-cover.is-hidden {
  display: none;
}

.play-circle {
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  padding-left: 6px;
  font-size: 30px;
  background: linear-gradient(135deg, var(--green), #22c55e);
  box-shadow: 0 20px 44px rgba(22, 163, 74, 0.36);
}

.player-cover strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.movie-side {
  padding: 16px;
}

.movie-side img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
}

.side-meta {
  margin-top: 14px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-recommend {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.title-line span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--green-dark);
  font-weight: 950;
}

.title-line h1 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.lead-text {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  background: #f0fdf4;
  color: #14532d;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 700;
}

.detail-tags {
  margin: 18px 0 24px;
}

.detail-tags a {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.detail-main h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.detail-main p {
  color: #374151;
  line-height: 1.95;
  font-size: 16px;
}

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

.info-table div {
  padding: 16px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.info-table strong,
.info-table span {
  display: block;
}

.info-table strong {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 6px;
}

.info-table span {
  font-weight: 900;
}

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

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding-top: 54px;
  padding-bottom: 34px;
}

.footer-brand {
  color: #fff;
  margin-bottom: 14px;
}

.footer-grid h2 {
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  margin-bottom: 14px;
}

.footer-grid p {
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #d1d5db;
  transition: 0.2s ease;
}

.footer-links a:hover {
  color: #86efac;
}

.footer-bottom {
  padding-top: 22px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

  .detail-content,
  .split-section {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

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

  .main-nav a {
    background: #f9fafb;
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .hero-content {
    min-height: 66vh;
    padding: 96px 18px 82px;
  }

  .hero-arrow {
    display: none;
  }

  .surface,
  .filter-panel,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-controls {
    justify-content: stretch;
  }

  .filter-controls input,
  .filter-controls select {
    width: 100%;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-large-grid,
  .two-col-ranks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .movie-side {
    display: none;
  }

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

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

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

  .info-table {
    grid-template-columns: 1fr;
  }

  .section-shell,
  .footer-grid,
  .footer-bottom,
  .detail-container {
    padding-left: 16px;
    padding-right: 16px;
  }
}
