:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --teal-600: #0d9488;
  --yellow-300: #fde047;
  --yellow-400: #facc15;
  --orange-500: #f97316;
  --rose-600: #e11d48;
  --blue-500: #3b82f6;
  --cyan-600: #0891b2;
  --purple-500: #a855f7;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 10px 28px rgba(17, 24, 39, 0.08);
  --radius-xl: 18px;
  --radius-2xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--green-50), #ffffff 48%, #fff7ed);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--green-600), var(--emerald-700));
  box-shadow: 0 12px 30px rgba(4, 120, 87, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 24px;
}

.desktop-nav {
  display: flex;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--yellow-300);
  transform: translateY(-1px);
}

.nav-pill {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.mobile-nav {
  display: none;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav .nav-link {
  width: 100%;
  padding: 12px 0;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  color: var(--white);
  background: radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.25), transparent 28%), linear-gradient(115deg, #15803d, #059669 48%, #0f766e);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42));
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 110px;
  background: linear-gradient(180deg, transparent, #ffffff);
}

.hero-stage {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  align-items: center;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  gap: 48px;
  align-items: center;
  padding: 54px 0 90px;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.7s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--yellow-300);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.hero-title {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.card-meta,
.movie-meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.movie-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

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

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

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

.btn-primary {
  color: var(--gray-900);
  background: var(--yellow-400);
  box-shadow: 0 14px 26px rgba(250, 204, 21, 0.35);
}

.btn-primary:hover {
  background: var(--yellow-300);
}

.btn-glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-cover {
  position: relative;
}

.hero-cover-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  transform: rotate(1.5deg);
}

.hero-cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.16);
}

.hero-cover-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.58));
}

.hero-cover-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.hero-cover-caption strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.22s ease, background 0.22s ease;
}

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

.section {
  padding: 54px 0;
}

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

.section-title {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-lead {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--gray-600);
  font-size: 17px;
}

.text-link {
  color: var(--green-600);
  font-weight: 800;
}

.stat-grid,
.category-grid,
.movie-grid,
.feature-grid,
.related-grid {
  display: grid;
  gap: 22px;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: -56px;
  position: relative;
  z-index: 4;
}

.stat-card {
  overflow: hidden;
  min-height: 136px;
  padding: 24px;
  border-radius: var(--radius-2xl);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.82);
}

.bg-rose {
  background: linear-gradient(135deg, #ec4899, var(--rose-600));
}

.bg-blue {
  background: linear-gradient(135deg, var(--blue-500), var(--cyan-600));
}

.bg-orange {
  background: linear-gradient(135deg, var(--orange-500), #d97706);
}

.bg-green {
  background: linear-gradient(135deg, var(--green-500), var(--emerald-600));
}

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

.movie-card,
.rank-card,
.category-card,
.info-panel,
.filter-panel,
.player-card,
.detail-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(250, 204, 21, 0.2));
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img,
.related-card:hover img {
  transform: scale(1.07);
}

.poster-shade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  padding: 14px;
  color: var(--white);
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7));
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--white);
  background: var(--green-500);
  font-size: 12px;
  font-weight: 800;
}

.hot-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ef4444;
}

.new-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--blue-500);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-800);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.22s ease;
}

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

.card-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  justify-content: space-between;
  color: var(--gray-500);
  font-size: 13px;
}

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

.category-card {
  display: block;
  padding: 24px;
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-500), var(--emerald-600));
  font-size: 28px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 850;
}

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

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

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

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

.rank-num {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-500), var(--rose-600));
  font-size: 20px;
  font-weight: 900;
}

.rank-card img {
  width: 112px;
  height: 70px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--green-100);
}

.rank-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--gray-600);
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rank-score {
  color: var(--green-600);
  font-weight: 850;
  white-space: nowrap;
}

.page-hero {
  padding: 70px 0;
  color: var(--white);
  background: radial-gradient(circle at 88% 12%, rgba(250, 204, 21, 0.25), transparent 26%), linear-gradient(110deg, var(--green-600), var(--emerald-600));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

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

.breadcrumb a {
  color: var(--green-600);
  font-weight: 750;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 14px;
}

.search-input,
.select-input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--gray-200);
  border-radius: 15px;
  padding: 0 16px;
  outline: none;
  background: var(--white);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.search-input:focus,
.select-input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.empty-result {
  display: none;
  padding: 50px 20px;
  text-align: center;
  color: var(--gray-600);
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
}

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

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #050505;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  color: var(--white);
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: var(--gray-900);
  background: var(--yellow-400);
  box-shadow: 0 18px 38px rgba(250, 204, 21, 0.36);
  font-size: 34px;
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 18px;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.detail-card h2,
.detail-sidebar h2 {
  margin: 28px 0 12px;
  font-size: 22px;
  font-weight: 850;
}

.detail-card p {
  margin: 0 0 14px;
  color: var(--gray-700);
  font-size: 16px;
}

.detail-card .movie-meta span {
  color: var(--gray-700);
  background: var(--gray-100);
}

.detail-card .tag {
  color: var(--green-700, #047857);
  background: var(--green-100);
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 20px;
}

.sidebar-panel {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.sidebar-link {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-link:last-child {
  border-bottom: 0;
}

.sidebar-link img {
  width: 74px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--green-100);
}

.sidebar-link strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar-link span {
  display: block;
  margin-top: 2px;
  color: var(--gray-500);
  font-size: 12px;
}

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

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

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--green-100);
  transition: transform 0.28s ease;
}

.related-card h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  margin-top: 60px;
  color: var(--white);
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 28px;
  padding: 46px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-500), var(--emerald-600));
  box-shadow: var(--shadow-soft);
}

.back-top.visible {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .hero-cover {
    max-width: 420px;
    margin: 0 auto;
  }

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

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

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

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

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

  .hero-slide {
    gap: 26px;
    padding: 42px 0 86px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .rank-score {
    grid-column: 3;
  }

  .rank-num {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 17px;
  }

  .rank-card img {
    width: 88px;
    height: 58px;
  }

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

  .logo strong {
    font-size: 18px;
  }
}
