* {
  box-sizing: border-box;
}

:root {
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --amber-500: #f59e0b;
  --blue-500: #3b82f6;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--emerald-50), #ffffff 32%, #f8fafc 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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: linear-gradient(90deg, var(--emerald-800), var(--emerald-600));
  box-shadow: 0 10px 30px rgba(6, 95, 70, 0.25);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.brand-name {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 14px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--emerald-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 18%, rgba(16, 185, 129, 0.34), transparent 34%),
    linear-gradient(90deg, rgba(2, 44, 34, 0.94), rgba(6, 78, 59, 0.78) 45%, rgba(6, 95, 70, 0.32));
  backdrop-filter: blur(1px);
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 340px;
  align-items: center;
  gap: 48px;
}

.hero-text {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-text h1 {
  margin: 24px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-text p {
  margin: 0;
  max-width: 680px;
  color: #d1fae5;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--emerald-900);
  background: rgba(255, 255, 255, 0.90);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 50px;
  padding: 0 26px;
}

.primary-btn {
  color: var(--emerald-800);
  background: var(--white);
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.22);
}

.secondary-btn {
  color: var(--white);
  background: linear-gradient(90deg, var(--emerald-600), var(--emerald-500));
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.small-btn {
  min-height: 38px;
  padding: 0 18px;
  color: var(--white);
  background: var(--emerald-600);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.small-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(6, 95, 70, 0.22);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 55%, rgba(2, 44, 34, 0.7));
}

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

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

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 70px 0;
}

.section.alt {
  background: linear-gradient(90deg, #eff6ff, var(--emerald-50));
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--emerald-700);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title,
.page-title {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.section-desc,
.page-desc {
  margin: 12px 0 0;
  color: var(--gray-600);
  max-width: 760px;
}

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

.stat-card,
.category-card,
.info-card,
.rank-card,
.detail-box,
.filter-panel {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.stat-card {
  padding: 28px;
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--emerald-600);
  font-size: 36px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--gray-600);
}

.category-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  min-height: 210px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background: var(--emerald-100);
}

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

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 20px;
  color: var(--gray-600);
}

.category-card span {
  position: relative;
  z-index: 1;
  color: var(--emerald-700);
  font-weight: 800;
}

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

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

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

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

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.year-badge {
  right: 12px;
  background: var(--emerald-600);
}

.type-badge {
  left: 12px;
  background: rgba(0, 0, 0, 0.66);
}

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

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

.movie-card-body h2 a:hover,
.movie-card-body h3 a:hover {
  color: var(--emerald-600);
}

.movie-card-body p {
  margin: 0 0 14px;
  color: var(--gray-600);
  font-size: 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-number {
  color: var(--emerald-600);
  font-size: 32px;
  font-weight: 900;
  text-align: center;
}

.rank-card img {
  width: 96px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.rank-card h2,
.rank-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-card p {
  margin: 0;
  color: var(--gray-600);
}

.filter-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  margin-bottom: 28px;
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--gray-700);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  outline: none;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: var(--white);
  background: var(--emerald-600);
}

.page-hero {
  padding: 64px 0 44px;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 10%, rgba(16, 185, 129, 0.28), transparent 26%),
    linear-gradient(110deg, var(--emerald-950), var(--emerald-700));
}

.page-hero .page-title,
.page-hero .page-desc {
  color: var(--white);
}

.page-hero .page-desc {
  color: #d1fae5;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bbf7d0;
  font-weight: 700;
}

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

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

.player-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--gray-950);
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gray-950);
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--gray-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 2;
}

.player-overlay.hidden {
  display: none;
}

.play-circle {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--emerald-700);
  font-size: 36px;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.24);
}

.detail-main {
  display: grid;
  gap: 24px;
}

.detail-box {
  padding: 28px;
}

.detail-box h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-box p {
  margin: 0 0 14px;
  color: var(--gray-700);
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.cover-panel {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.cover-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.info-card {
  padding: 24px;
}

.info-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.info-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

.info-list dt {
  color: var(--gray-500);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--gray-900);
  text-align: right;
  font-weight: 700;
}

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

.site-footer {
  padding-top: 56px;
  color: #d1fae5;
  background: linear-gradient(180deg, var(--emerald-900), var(--emerald-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #86efac;
  font-size: 18px;
}

.site-footer p {
  margin: 14px 0 0;
  max-width: 460px;
}

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

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  margin-top: 42px;
  padding: 22px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: #a7f3d0;
}

.no-results {
  display: none;
  padding: 42px 20px;
  color: var(--gray-600);
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}

.no-results.show {
  display: block;
}

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

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

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

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

  .detail-side {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav.open {
    display: block;
  }

  .hero-carousel {
    height: auto;
    min-height: 720px;
  }

  .hero-slide {
    position: absolute;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 58px 0 92px;
  }

  .hero-poster {
    max-width: 260px;
    transform: none;
  }

  .section-header,
  .rank-card {
    align-items: flex-start;
  }

  .section-header {
    flex-direction: column;
  }

  .rank-card {
    grid-template-columns: 54px 80px minmax(0, 1fr);
  }

  .rank-card .small-btn {
    grid-column: 2 / 4;
    width: 100%;
  }

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

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

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

  .hero-carousel {
    min-height: 760px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }

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

  .rank-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .rank-card img {
    display: none;
  }

  .rank-card .small-btn {
    grid-column: 1 / 3;
  }

  .section {
    padding: 46px 0;
  }
}
