:root {
  --primary: #4a7c54;
  --primary-dark: #233d26;
  --primary-soft: #f4f7f5;
  --accent: #e88f1a;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --bg: #f9fafb;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 26px rgba(74, 124, 84, 0.25);
}

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

.main-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 650;
  transition: all 0.25s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  background: var(--primary-soft);
  color: var(--primary-dark);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  min-height: 620px;
  display: none;
  position: relative;
  isolation: isolate;
}

.hero-slide.active {
  display: block;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.48;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 22%, rgba(232, 143, 26, 0.26), transparent 30%),
    linear-gradient(115deg, rgba(17, 24, 39, 0.92), rgba(35, 61, 38, 0.82) 52%, rgba(17, 24, 39, 0.7));
}

.hero-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 22px 84px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 60px;
}

.hero-text {
  color: #fff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text h1 {
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  margin: 18px 0 20px;
  letter-spacing: -0.04em;
}

.hero-text p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.tag-row.wide {
  margin-top: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 28px rgba(74, 124, 84, 0.28);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn.ghost.dark,
.btn.text {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid rgba(74, 124, 84, 0.18);
}

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

.hero-poster img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.active {
  width: 30px;
  background: #fff;
}

.section-wrap,
.search-panel,
.page-main,
.detail-main {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.section-wrap {
  padding-top: 68px;
  padding-bottom: 26px;
}

.no-top {
  padding-top: 22px;
}

.search-panel {
  margin-top: -44px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr 160px 150px;
  gap: 10px;
}

.search-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 46px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

.search-input:focus,
.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(74, 124, 84, 0.12);
}

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

.section-title h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.03em;
}

.section-title > a {
  color: var(--primary);
  font-weight: 800;
}

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

.category-tile {
  min-height: 138px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
  transition: all 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 124, 84, 0.35);
}

.category-tile span {
  display: block;
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 850;
  margin-bottom: 10px;
}

.category-tile small {
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  transition: all 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--primary-soft);
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

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

.card-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
}

.card-meta span + span::before,
.detail-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #9ca3af;
}

.movie-card h3,
.ranking-card h2 {
  margin: 8px 0 8px;
  line-height: 1.35;
  font-size: 18px;
}

.movie-card h3 a:hover,
.ranking-card h2 a:hover {
  color: var(--primary);
}

.movie-card p,
.ranking-card p {
  min-height: 52px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card.compact p {
  display: none;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.rank-box {
  position: sticky;
  top: 92px;
  padding: 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff, var(--primary-soft));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.rank-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 850;
  color: var(--primary-dark);
}

.rank-head a {
  color: var(--primary);
  font-size: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-no {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-weight: 850;
}

.rank-title {
  font-weight: 800;
  line-height: 1.35;
}

.rank-sub {
  color: var(--muted);
  font-size: 13px;
}

.page-main,
.detail-main {
  padding-top: 34px;
  padding-bottom: 60px;
}

.page-hero {
  border-radius: 30px;
  padding: 54px;
  margin-bottom: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 22% 28%, rgba(232, 143, 26, 0.28), transparent 32%),
    linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 4vw, 58px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.category-overview {
  margin-bottom: 30px;
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
}

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

.category-overview h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

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

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.07);
}

.ranking-cover {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.ranking-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ranking-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  padding: 34px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 85% 15%, rgba(232, 143, 26, 0.16), transparent 32%),
    linear-gradient(135deg, #ffffff, var(--primary-soft));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.18);
}

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

.detail-info h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 4.5vw, 64px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.lead {
  margin: 0 0 16px;
  color: #374151;
  font-size: 18px;
}

.player-section,
.detail-content {
  margin-top: 34px;
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.player-section h2,
.detail-content h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.video-shell {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  cursor: pointer;
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  background: rgba(2, 6, 23, 0.5);
}

.play-cover.hidden {
  display: none;
}

.play-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  font-size: 28px;
  text-indent: 4px;
}

.play-cover strong {
  max-width: 680px;
  font-size: clamp(22px, 3vw, 40px);
}

.play-cover em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
}

.player-status {
  min-height: 26px;
  margin: 12px 0 0;
  color: var(--muted);
}

.detail-content article + article {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.detail-content p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.site-footer {
  margin-top: 70px;
  background: #111827;
  color: #fff;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.66);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .hero-content,
  .split-layout,
  .detail-hero,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 330px;
    margin: 0 auto;
  }

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

  .rank-box {
    position: static;
  }

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

@media (max-width: 680px) {
  .nav-shell {
    height: 64px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

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

  .hero-content {
    padding-top: 52px;
    gap: 34px;
  }

  .hero-poster {
    display: none;
  }

  .search-panel {
    margin-top: 20px;
    border-radius: 22px;
  }

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

  .page-hero,
  .detail-hero,
  .category-overview,
  .player-section,
  .detail-content {
    padding: 22px;
    border-radius: 24px;
  }

  .ranking-card {
    grid-template-columns: 96px 1fr;
    gap: 14px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}
