:root {
  --bg: #f7faf7;
  --surface: #ffffff;
  --surface-soft: #eef8ef;
  --text: #132018;
  --muted: #647067;
  --line: #dfe9e1;
  --green: #16a34a;
  --green-dark: #087c35;
  --green-soft: #dcfce7;
  --gold: #f6b73c;
  --shadow: 0 18px 50px rgba(18, 60, 34, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 36%, #f8fbf8 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(223, 233, 225, 0.9);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.26);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334139;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--green-dark);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.top-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 8px 8px 12px;
  color: var(--text);
  background: transparent;
}

.top-search button,
.primary-btn,
.secondary-btn,
.filter-btn,
.play-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-btn,
.play-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.24);
}

.top-search button {
  padding: 8px 16px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
}

.secondary-btn {
  color: var(--green-dark);
  background: #ffffff;
  border: 1px solid rgba(22, 163, 74, 0.28);
}

.primary-btn:hover,
.secondary-btn:hover,
.top-search button:hover,
.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.26);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.hero {
  position: relative;
  padding: 34px 0 24px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -120px -10% auto auto;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.12);
  filter: blur(4px);
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #0f2318;
}

.hero-slide {
  display: none;
  min-height: 520px;
  background-size: cover;
  background-position: center;
}

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

.hero-overlay {
  min-height: inherit;
  display: flex;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(7, 25, 14, 0.92) 0%, rgba(7, 25, 14, 0.66) 48%, rgba(7, 25, 14, 0.18) 100%),
    linear-gradient(0deg, rgba(7, 25, 14, 0.88), rgba(7, 25, 14, 0.08) 48%);
}

.hero-content {
  width: min(760px, 100%);
  padding: 58px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #dffbe7;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

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

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

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #e6ffee;
  background: rgba(255, 255, 255, 0.14);
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-control {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.quick-cats {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 22px 0 4px;
}

.category-chip {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #334139;
  box-shadow: 0 8px 22px rgba(19, 32, 24, 0.05);
}

.category-chip:hover {
  color: var(--green-dark);
  border-color: rgba(22, 163, 74, 0.4);
}

main {
  min-height: 60vh;
}

.section {
  padding: 44px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--green-dark);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(223, 233, 225, 0.85);
  box-shadow: 0 12px 28px rgba(19, 32, 24, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(22, 163, 74, 0.32);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #123c22, #2dd15e);
}

.poster-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #10391f, #29b85c);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 20, 11, 0.36), transparent 62%);
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.cover-image.is-missing {
  opacity: 0;
}

.movie-card:hover .cover-image {
  transform: scale(1.05);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #102016;
  background: linear-gradient(135deg, #ffe8a3, var(--gold));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-title:hover {
  color: var(--green-dark);
}

.movie-meta {
  margin: 9px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #526058;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

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

.category-card {
  min-height: 188px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.24), transparent 30%),
    linear-gradient(135deg, #0b5f2b, #18aa4f);
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.page-hero {
  padding: 54px 0 28px;
}

.page-title {
  padding: 34px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(255, 255, 255, 0.96)),
    #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(19, 32, 24, 0.06);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.filter-btn {
  padding: 9px 14px;
  color: #334139;
  background: #ffffff;
  border: 1px solid var(--line);
}

.filter-btn.active,
.filter-btn:hover {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.ranking-num {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 900;
  color: var(--green-dark);
  background: var(--green-soft);
}

.ranking-item h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.ranking-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.heat {
  color: var(--green-dark);
  font-weight: 900;
}

.detail-hero {
  padding: 36px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border-radius: 30px;
  background: #07150c;
  box-shadow: var(--shadow);
}

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

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(22, 163, 74, 0.08), rgba(0, 0, 0, 0.55));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  min-width: 132px;
  min-height: 54px;
  padding: 0 24px;
  font-weight: 900;
  font-size: 18px;
}

.player-info {
  padding: 18px 20px;
  color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(180deg, #0d1f14, #07150c);
}

.player-info h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 20px;
}

.player-info p {
  margin: 0;
}

.detail-panel {
  padding: 28px;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(19, 32, 24, 0.06);
}

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

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

.detail-title h1 {
  font-size: clamp(32px, 4vw, 52px);
}

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

.detail-summary,
.detail-review {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.detail-summary h2,
.detail-review h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-summary p,
.detail-review p {
  margin: 0;
  color: #405047;
}

.search-panel {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
}

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

.search-panel input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
}

.search-panel button {
  padding: 0 22px;
}

.empty-state {
  padding: 30px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 54px;
  padding: 48px 0 0;
  color: #dcefe2;
  background: #0a1b10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
}

.site-footer p {
  color: #a7b8ae;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: #bdd1c3;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(22, 163, 74, 0.36);
}

.footer-bottom {
  margin-top: 40px;
  padding: 18px;
  text-align: center;
  color: #9dafab;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

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

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

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

  .top-search {
    order: 3;
    width: 100%;
  }

  .top-search input {
    width: 100%;
  }

  .hero-slide {
    min-height: 470px;
  }

  .hero-content {
    padding: 34px;
  }

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

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

  .detail-grid,
  .footer-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }
}

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

  .brand-text {
    font-size: 18px;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-slider,
  .page-title,
  .player-shell,
  .detail-panel {
    border-radius: 22px;
  }

  .hero-slide {
    min-height: 430px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-controls {
    right: 18px;
    bottom: 18px;
  }

  .section {
    padding: 32px 0;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 10px;
  }

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

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

  .movie-title {
    font-size: 15px;
  }

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

  .ranking-item {
    grid-template-columns: 56px 1fr;
  }

  .ranking-item .heat {
    grid-column: 2;
  }

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