:root {
  --green: #16a34a;
  --emerald: #047857;
  --teal: #0f766e;
  --yellow: #facc15;
  --rose: #e11d48;
  --blue: #0284c7;
  --orange: #ea580c;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --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(--ink);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 42%, #fefce8 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #16a34a, #047857 58%, #0f766e);
  box-shadow: 0 12px 32px rgba(4, 120, 87, 0.24);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand:hover {
  color: var(--yellow);
}

.brand-mark {
  font-size: 31px;
  line-height: 1;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  font-weight: 650;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

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

.nav-pill.light {
  background: rgba(255, 255, 255, 0.26);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav a {
  display: block;
  padding: 10px 4px;
  font-weight: 650;
}

.mobile-nav a:hover {
  color: var(--yellow);
}

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

.hero-carousel {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #15803d, #059669 52%, #0f766e);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap: 42px;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 68px 0 88px;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100vw;
  margin-left: calc((1240px - 100vw) / 2);
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.15);
  transform: scale(1.04);
  opacity: 0.28;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100vw;
  margin-left: calc((1240px - 100vw) / 2);
  background:
    radial-gradient(circle at 78% 30%, rgba(250, 204, 21, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(5, 46, 22, 0.88), rgba(6, 95, 70, 0.72), rgba(15, 118, 110, 0.76));
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-weight: 700;
  color: #fef3c7;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 740px;
  margin: 0 0 22px;
  color: #dcfce7;
  font-size: clamp(17px, 2vw, 23px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.16);
}

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

.btn-primary,
.btn-secondary,
.section-more,
.filter-panel button,
.player-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  min-height: 46px;
  padding: 0 24px;
  color: #111827;
  background: var(--yellow);
  box-shadow: 0 14px 36px rgba(250, 204, 21, 0.28);
}

.btn-secondary {
  min-height: 46px;
  padding: 0 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover,
.filter-panel button:hover,
.player-start:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster-card {
  position: relative;
  max-width: 390px;
  justify-self: end;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.34);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster-card img {
  width: 100%;
  height: 510px;
  object-fit: cover;
}

.hero-poster-info {
  position: absolute;
  inset: auto 0 0;
  padding: 68px 22px 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.hero-poster-info strong {
  display: block;
  font-size: 20px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 3;
}

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

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

.main-shell,
.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 38px 0 60px;
}

.stat-card {
  padding: 24px;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.stat-card:nth-child(1) {
  background: linear-gradient(135deg, #ec4899, #e11d48);
}

.stat-card:nth-child(2) {
  background: linear-gradient(135deg, #0ea5e9, #0891b2);
}

.stat-card:nth-child(3) {
  background: linear-gradient(135deg, #f97316, #d97706);
}

.stat-card:nth-child(4) {
  background: linear-gradient(135deg, #22c55e, #059669);
}

.stat-card strong {
  display: block;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
}

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

.content-section {
  margin: 0 0 64px;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 22px;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  font-weight: 900;
}

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

.section-more {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  color: #065f46;
  background: #dcfce7;
}

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

.movie-card {
  border-radius: 19px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card.is-hidden {
  display: none;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #064e3b, #059669);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent);
}

.year-badge,
.rank-badge,
.hot-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.year-badge {
  right: 12px;
  background: rgba(17, 24, 39, 0.72);
}

.rank-badge {
  left: 12px;
  background: #ef4444;
}

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

.movie-card h3 {
  margin: 0 0 7px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  min-height: 42px;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  color: #047857;
  background: #dcfce7;
}

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

.category-tile {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile a {
  display: block;
  min-height: 100%;
  padding: 24px;
}

.category-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  font-size: 30px;
  background: linear-gradient(135deg, #dcfce7, #fef3c7);
}

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

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

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  padding: 8px 10px;
  border-radius: 10px;
  color: #065f46;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 700;
}

.page-hero {
  padding: 54px 0 42px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(250, 204, 21, 0.28), transparent 28%),
    linear-gradient(135deg, #15803d, #047857 60%, #0f766e);
}

.page-hero .page-shell {
  display: grid;
  gap: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

.page-hero h1 {
  max-width: 960px;
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  font-weight: 900;
}

.page-hero p {
  max-width: 850px;
  margin: 0;
  color: #dcfce7;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin: 34px 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.search-box,
.select-box {
  display: grid;
  gap: 7px;
  color: #374151;
  font-weight: 800;
  font-size: 14px;
}

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

.search-box input:focus,
.select-box select:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

.filter-panel button {
  min-height: 44px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--emerald));
}

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

.player-card,
.detail-card,
.side-card {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

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

.movie-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.34);
  z-index: 2;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
}

.player-start-wrap {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  text-align: center;
}

.player-start {
  width: 82px;
  height: 82px;
  color: #111827;
  background: var(--yellow);
  box-shadow: 0 16px 42px rgba(250, 204, 21, 0.28);
  font-size: 28px;
}

.player-title {
  max-width: 720px;
  padding: 0 20px;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.18;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: #374151;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 14px;
  font-weight: 750;
}

.detail-tags span {
  color: #065f46;
  background: #d1fae5;
}

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

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

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

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 23px;
}

.mini-list {
  display: grid;
  gap: 13px;
}

.mini-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: #ecfdf5;
  transform: translateX(3px);
}

.mini-card img {
  width: 92px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #064e3b, #059669);
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  font-size: 14px;
  line-height: 1.35;
}

.mini-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.ranking-list {
  counter-reset: item;
  display: grid;
  gap: 14px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 68px 116px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  font-weight: 900;
}

.ranking-row img {
  width: 116px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #064e3b, #059669);
}

.ranking-row h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

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

.ranking-row .btn-primary {
  min-height: 40px;
  padding: 0 16px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #0f172a);
}

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 26px;
}

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

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff !important;
  font-size: 22px !important;
}

.footer-grid p,
.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: var(--yellow);
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

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

  .hero-poster-card {
    display: none;
  }

  .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;
  }
}

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

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

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

  .hero-slide {
    padding-top: 56px;
  }

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

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

  .ranking-row {
    grid-template-columns: 52px 92px 1fr;
  }

  .ranking-row .btn-primary {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .main-shell,
  .page-shell,
  .footer-shell {
    width: min(100% - 22px, 1240px);
  }

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

  .hero-content h1 {
    font-size: 34px;
  }

  .hero-actions {
    display: grid;
  }

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

  .detail-card {
    padding: 20px;
  }

  .ranking-row {
    grid-template-columns: 48px 1fr;
  }

  .ranking-row img {
    display: none;
  }

  .ranking-row .btn-primary {
    grid-column: 1 / -1;
  }
}
