:root {
  --bg: #f7fffb;
  --surface: #ffffff;
  --surface-soft: #ecfdf5;
  --text: #12231c;
  --muted: #5f7069;
  --line: #c7eadb;
  --primary: #059669;
  --primary-dark: #047857;
  --secondary: #0f766e;
  --accent: #f59e0b;
  --shadow: 0 18px 50px rgba(8, 95, 67, 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;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #ffffff 100%);
  color: var(--text);
  line-height: 1.65;
}

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: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(5, 150, 105, 0.14);
  box-shadow: 0 8px 30px rgba(5, 150, 105, 0.08);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.24);
  position: relative;
  flex: 0 0 auto;
}

.logo-mark::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  border-left: 10px solid #ffffff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  color: #33443d;
}

.nav-menu a {
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: radial-gradient(circle at 14% 18%, rgba(245, 158, 11, 0.22), transparent 28%), radial-gradient(circle at 84% 18%, rgba(20, 184, 166, 0.18), transparent 32%), linear-gradient(135deg, #d1fae5 0%, #ecfeff 45%, #fff7ed 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 118, 110, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 118, 110, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.9;
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -160px;
  bottom: -180px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.16);
  filter: blur(4px);
}

.hero-stage {
  position: relative;
  z-index: 1;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 56px;
  align-items: center;
  padding: 58px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.08);
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  font-weight: 900;
  background: linear-gradient(90deg, #065f46, #0f766e, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 30px;
  max-width: 620px;
  color: #465952;
  font-size: clamp(17px, 2vw, 21px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 20px 38px rgba(5, 150, 105, 0.28);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(5, 150, 105, 0.18);
  color: var(--primary-dark);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(620px, 100%);
  padding: 8px;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 16px;
  background: rgba(236, 253, 245, 0.72);
  color: var(--text);
  font-size: 15px;
}

.search-box button,
.filter-bar button {
  border: 0;
  border-radius: 16px;
  padding: 0 20px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.hero-panel {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  border-radius: 34px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.97) translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  background: #06271f;
  box-shadow: 0 26px 72px rgba(5, 80, 60, 0.24);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  opacity: 0.92;
}

.hero-slide-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 118px 28px 28px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.74) 72%);
}

.hero-slide-content h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
}

.hero-slide-content p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.84);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 28px;
  top: 28px;
  display: flex;
  gap: 8px;
}

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

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

.section {
  padding: 72px 0;
}

.section-soft {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.66), rgba(255, 255, 255, 0));
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(7, 89, 65, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.28);
  box-shadow: 0 24px 58px rgba(7, 89, 65, 0.14);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #fef3c7);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(5, 150, 105, 0.12);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.poster .badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.poster .score {
  position: absolute;
  right: 12px;
  top: 12px;
  background: rgba(245, 158, 11, 0.94);
  color: #ffffff;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-text {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  margin-top: auto;
  color: var(--primary);
  font-weight: 800;
}

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

.category-tile {
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(145deg, #ffffff, #ecfdf5);
  box-shadow: 0 12px 34px rgba(7, 89, 65, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(7, 89, 65, 0.12);
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(7, 89, 65, 0.06);
}

.rank-num {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.rank-thumb {
  width: 76px;
  height: 104px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-main h3 {
  margin: 0 0 6px;
}

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

.page-hero {
  padding: 74px 0 46px;
  background: radial-gradient(circle at 18% 12%, rgba(5, 150, 105, 0.14), transparent 28%), linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border-bottom: 1px solid rgba(5, 150, 105, 0.12);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.05em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

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

.breadcrumb a {
  color: var(--primary);
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 160px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid rgba(5, 150, 105, 0.14);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(7, 89, 65, 0.08);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #041915;
  box-shadow: 0 24px 70px rgba(7, 89, 65, 0.2);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #041915;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 0;
  background: rgba(5, 150, 105, 0.9);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 46px rgba(5, 150, 105, 0.36);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.play-overlay:hover {
  transform: scale(1.04);
}

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

.detail-card {
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 28px;
  background: #ffffff;
  padding: 26px;
  box-shadow: 0 14px 42px rgba(7, 89, 65, 0.08);
}

.detail-title {
  margin: 24px 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #465952;
}

.side-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

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

.footer {
  padding: 48px 0;
  margin-top: 72px;
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
  border-top: 1px solid rgba(5, 150, 105, 0.14);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.footer h3 {
  margin: 0 0 10px;
  color: var(--text);
}

.footer p,
.footer a {
  color: var(--muted);
}

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

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  border: 1px dashed rgba(5, 150, 105, 0.28);
  border-radius: 24px;
  color: var(--muted);
}

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

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

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

  .side-poster {
    max-width: 360px;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(5, 150, 105, 0.14);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .hero,
  .hero-stage {
    min-height: auto;
  }

  .hero-stage {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 44px 0 54px;
  }

  .hero-panel,
  .hero-slide img {
    min-height: 420px;
  }

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

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

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

  .rank-item .btn {
    grid-column: 2 / -1;
  }

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

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

  .logo {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 42px;
  }

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

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

  .section {
    padding: 52px 0;
  }
}
